[android-developers] Re: Maintaining sorted state of a ListView

2012-02-24 Thread skink
Kookamonga wrote: I have what seems like a very basic question: how can I maintain the sorted state of a ListView as new items are added to the list? I have a ListView that is populated from a database. Specifically, I query my database, create an ArrayList of items, and use a custom

[android-developers] Re: Maintaining sorted state of a ListView

2012-02-24 Thread Kookamonga
Thanks for your answer. I'll change over to a CursorAdapter and see how things go. On Feb 24, 10:30 am, skink psk...@gmail.com wrote: Kookamonga wrote: I have what seems like a very basic question: how can I maintain the sorted state of a ListView as new items are added to the list? I

[android-developers] Re: Maintaining sorted state of a ListView

2012-02-24 Thread Kookamonga
I've hit a problem in changing over to a CursorAdapter. The custom items in my ListView contained a Checkbox. After reading online, I had successfully implemented maintaining the state of the Checkbox such that it worked with view recycling: I was storing the state of the Checkbox in the same

[android-developers] Re: Maintaining sorted state of a ListView

2012-02-24 Thread Kookamonga
Looks like once again, it was all about Googling for the right thing: https://www.google.com/search?q=listview+cursoradapter+checkbox My bad. On Feb 24, 11:37 am, Kookamonga site...@yahoo.ca wrote: I've hit a problem in changing over to a CursorAdapter. The custom items in my ListView

[android-developers] Re: Maintaining sorted state of a ListView

2012-02-24 Thread Kookamonga
I have another problem. I was scheduling an alarm for each item in my ListView. Users were able to edit the time for the alarm by editing the item in the ListView. Per the docs, I had to cancel the previously set alarm myself and set a new alarm for the updated time as specified by the user during