0

How do you remove an item from a ListView in Android?

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.