Skip to content Skip to sidebar Skip to footer

Android Listview Scroll To Number Of Listitems

I am using Listview, i want to scroll down to list's 10 item when view get loaded, how can do that ????

Solution 1:

Try yourListView.setSelection(position)

Solution 2:

Try this:

mMessageList.addAll(result);
mMessageArrayAdapter.notifyDataSetChanged();

mMessageListView.clearFocus();
mMessageListView.post(new Runnable() {
    @Override
    public void run() {
        mMessageListView.setSelection(searchedMessagePosition);
    }
});

Post a Comment for "Android Listview Scroll To Number Of Listitems"