Search code examples
androidandroid-listviewandroid-cursoradapterandroid-adapterview

remove item from ListView without changing related database


I have a CursorAdapter which fetch data from SQLite Database and provides views for a list. Now I want to delete an item in list without deleting data from DB. As you can see here, it is possible to change view of specific item without changing the data-set. But removeViewAt(int index) is not supported in ListView. Is it possible to remove an item without changing DB?


Solution

  • try to append the deleted id of item in select query with not equal statement