tags:

views:

21

answers:

1

hai

i want to remove the listitem from listview in android.i don't know that how to do it. anyone can help me how to do it.and give sample code for this?

A: 

You need to change your underlying data source.

If you are using an ArrayAdapter, call remove() on the ArrayAdapter to remove the item, and it will vanish from the list.

If you are using SimpleCursorAdapter, remove the item from the database or content provider, then call requery() on the Cursor, and the item will vanish from the list.

CommonsWare