开发者

How to get a particular row of data from data base on Listview click?

开发者 https://www.devze.com 2023-02-10 08:45 出处:网络
How to get a particular row of data from da开发者_C百科ta base on Listview click?And set that data in edittext?Without context it can be tricky to answer but here are some elements that may help you.

How to get a particular row of data from da开发者_C百科ta base on Listview click?And set that data in edittext?


Without context it can be tricky to answer but here are some elements that may help you.

First you need to bind every element in your listview with a specific row index. This can be achieved either by using the position of the clicked item in the list (position = row) or by using the content display (tag, id, ...) to find the appropriate row in your database.

Then you can display the result data, as well as the EditText in a popup dialog. If you want the EditText to replace the data already displayed in the view, this can be a bit more complex though.

0

精彩评论

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

关注公众号