0

i have a listview with checkbox in each rows. i'm using custom cursoradapter and a Array variable for saving checkbox status.

everything is fine.

now i'm trying to delete all checked rows. but i have no idea how to deal with this.

i know which checkbox is checked. i can save the checked checkbox positions in a new array variable. but i don't know how to find the database _id by listview position(cursor.getPosition).

is there any way to find the DB _id by listview position(cursor.getPosition)?

or i hope i want to know if there's another way to delete a listview row which is checked in checkbox.

relatvant link or any other comment will be appreciated. thank you

1 Answer 1

1

You should be able to get the _id value for a row at a given position via the CursorAdapter.getItemId(int position) method. See documentation here.

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.