开发者

Get rowid from listview for deleting the row in the database

开发者 https://www.devze.com 2023-04-02 10:11 出处:网络
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百科

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..

0

精彩评论

暂无评论...
验证码 换一张
取 消