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 ????
Try yourListView.setSelection(position)
Try this:
mMessageList.addAll(result);
mMessageArrayAdapter.notifyDataSetChanged();
mMessageListView.clearFocus();
mMessageListView.post(new Runnable() {
@Override
public void run() {
mMessageListView.setSelection(searchedMessagePosition);
}
});
精彩评论