Yeah getting the Android documentation updated would be one of my highest priorities. I waisted a day proving to myself it was wrong.
My goal was to have a ListView, with items in the ListView grouped by first letter. Seemed easy, but the best way I could think of was to add 2 database columns, one with what grouping an entry counts as (in case we use a more complicated localized algorithm then the first letter in the string), and one with a groupingrank, which only matters for determining whether an entry is the first entry in a group.. I could not find a better way to do it then to go through each entry in the sorted cursor, calling context.getContentResolver().update( for any row that does not yet have it's grouping and groupingrank set properly. then in my ListView's Adapter I have a view which is invisible unless it is the first row in a group, and then it's group (the Letter A for example) would appear looking like a section header. So it would be A Aardvark Android Anteater B Bear C CyberBear M MutantCyberBear where A Aardvark is really a single row in the ListView. On Mar 16, 10:58 am, Mark Murphy <mmur...@commonsware.com> wrote: > Matt Kanninen wrote: > > This page: > > >http://developer.android.com/reference/android/database/Cursor.html > > > says: > > > "This interface provides random read-write access to the result set > > returned by a database query." > > > but I can't find any way to update a database with a cursor. > > That document is somewhat out of date. You used to be able to modify the > database using a Cursor, but that got dropped somewhere before Android 1.0. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android Consulting/App Development:http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en