1

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.

dudi
  • 5,523
  • 4
  • 28
  • 57

1 Answers1

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