Relative Content

Tag Archive for androidandroid-recyclerviewnestedrecyclerview

Only highlight single item in nestes recycler view

I have a nested recycler view where the user should only be able to pick one single item inside the child recycler views. When an item is clicked on it is highlighted. Unfortunately the user is able to highlight an item in each child recycler view instead of just one overall.
How can I achieve only one highlighted item?

Android Nested Recyclerview Implementation

I have onButton click in helper class which has update method which sets/updates the child recycler view for child items. Singlehash in this activity stores the selected pouch items. The problem here is whenever the update method is called even if I select any other items from the list it keeps updating all the selected parent items with same child recycler view list. I want to implement in a way that if I select child items for one item then it should assign to that item only. It should not refresh the parent list and assign same child items to all. How can I implement that? Modify my code accordingly.