0

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 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!

BolbazarMarme
  • 1,221
  • 2
  • 13
  • 25
  • i think this link can be helpful to you. http://stackoverflow.com/questions/5903597/add-new-items-to-top-of-list-view-on-android – Rahul Mandaliya Aug 04 '11 at 06:05

1 Answers1

0

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.

Trevor
  • 10,903
  • 5
  • 61
  • 84
  • i'm using simplecursoradapter, and as you know it also depends on the id's of the items, that's why the smallest id have the first place of the listview items...., is your answer can also be done with simplecursoradapter? – BolbazarMarme May 10 '11 at 10:06