开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜