skataben wrote: > Bump. I have the same question. Right now, I'm using the code below. > There's got to be a simpler way. > > private void updateListview() { > // Close the old Cursor > if(mCursorAdapter != null) { > Cursor c = mCursorAdapter.getCursor(); > c.close(); > } > > // Create the new Cursor. > Cursor c = this.queryAllUsernames(); > mCursorAdapter = new SimpleCursorAdapter(this, > R.layout.singleitem_row, c, FROM_COLUMNS, TO_VIEWS); > setListAdapter( mCursorAdapter ); > }
Just call requery() on the Cursor, and the rest will take care of itself. You do not need to do anything else. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---