Get rowid from listview for deleting the row in the database
I am using Custom Adapter to populate a listview which is reading from the database.Here when i do a longpress on a listitem,i want to delete the item from the listview and the databas开发者_Python百科e.How to get the rowid to delete that item from the database.
Thanks.
you need to pass that id to custom list adapter and make method returning the id which will get called onItemclick and this id you can pass to db to delete the corresponding row and then you can update the list..
精彩评论