how to update list items upward in android?
i have a list view that will keep adding its items when the user clicks the word suggestion, provided by an autocompletetextview....
as we know, the list items of a listview will be added at the bottom of the other item, this will make the last item become the most bottom of all.
what i want to do is to make the list items added upward, so that the last added item will be the first 开发者_JS百科or the most top of all items on my activity layout, and the first added item become the most bottom of all items....
I hope it won't be so difficult to figure out...
Thanks!
A solution could be to simply extend ArrayAdapter (assuming you're not doing so already) and implement (override) getView(), getCount(), etc. Your overridden getView() method could then generate the individual views based upon your data array of items as usual, except that it would take items from the array in reverse order.
精彩评论