I made a layout for an item, with a hidden checkbox. On a long press, I want to make all checkboxes for all item in the recyclerview visible. I've tried to implement a long click listener but on a long press of an item only the check box for this specific item becomes visible.
Asked
Active
Viewed 895 times
1
-
Please provide your code – Hagar Magdy Feb 09 '20 at 14:35
1 Answers
2
- Adapter has 1 boolean to control visibility of checkbox in all items. If it is false, hide checkbox of the rows and vise versa
- When user long clicks on 1 item, change this boolean to true
- Right after that, call notifyDataSetChanged
- The list will display all checkboxes

Hoàn Lê
- 127
- 1
- 4