I have created search on listview,but row selection get effected while search,I assume selection is maintained based on index.Can any one explain best way to solve this problem.
Asked
Active
Viewed 77 times
-1
-
Set a custom id to every element of the listview and set selection based on that id rather than the index of listview. You will have to keep track of all the selected items using that custom id. – Rohit5k2 Jan 15 '16 at 09:28
1 Answers
1
you may set different custom id or setTag to listview elements after clickListener you can get that custom id or tag so you can check which item is clicked.
View v;
v.setId();
v.setTag();

Mahesh Giri
- 1,810
- 19
- 27