开发者

android listview scroll to number of listitems

开发者 https://www.devze.com 2022-12-14 14:06 出处:网络
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:

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);
    }
});
0

精彩评论

暂无评论...
验证码 换一张
取 消