I am trying to remove an item from a cursor object, and I am not sure how to do it (or if possible). I really do not want to remove the item from the database, just "filter" it and not display it, depending on user settings.
For example, FILTER_TEXT matches the preferences of the application and contains text that the cursor should contain, or it is deleted.
Cursor mCursor = mDB.query(dbTable, new String[] {KEY_ROWID, KEY_NAME, KEY_URL}, null, null, null, null, null); if (mCursor.moveToFirst()) { do { if (!mCursor.getString(1).contains(FILTER_TEXT)) {
I was sure this was the right way to handle this, but I cannot find a way to remove the item from the cursor ...
Any help would be appreciated, welcome!
android android cursor
jsw
source share