开发者

List view will show most recent items from the bottom and old item will be invisible

开发者 https://www.devze.com 2023-04-10 17:14 出处:网络
I have a list view. How can I show the item of the listView from the below.Item will be displayed from the bottom of the screen.when th开发者_JS百科ere are many items then it will show the most recent

I have a list view. How can I show the item of the listView from the below.Item will be displayed from the bottom of the screen.when th开发者_JS百科ere are many items then it will show the most recent items from the bottom screen.when I scroll the listView to up then it will show the old item.

What is the efficient procedure?


You could try

adapter.notifyDataSetChanged();

and then

listView.setSelection(items.size()-1);

after every addition to the data array.


Implement your own Adapter by extending baseAdapter and then in its getView method use the position variable to get the reverse order.

here is an example

0

精彩评论

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