Inserting items into a listview in reverse order

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Inserting items into a listview in reverse order

Postby noamwolf » Sun Nov 23, 2008 1:12 am

How would I go about adding items into a listview in reverse order such that if I add 4 items sequentially the list would look like this:

Item 4
Item 3
Item 2
Item 1
noamwolf
Junior Developer
Junior Developer
 
Posts: 13
Joined: Sun Nov 23, 2008 12:56 am

Top

Postby MrSnowflake » Sun Nov 23, 2008 1:18 pm

Implement your own ListAdapter with this functionality.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby noamwolf » Sun Nov 23, 2008 4:25 pm

Right, I have implemented my own listadapter which extends ArrayAdapter, but I don't want to have to shift all items every time I insert... do you have something else in mind or is this kind of what you meant?

Thanks for the reply btw!
noamwolf
Junior Developer
Junior Developer
 
Posts: 13
Joined: Sun Nov 23, 2008 12:56 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot] and 4 guests