Skip to content
Advertisement

RecyclerView Update Single Item’s Child

enter image description here

My Recyclerview list is as in the picture.

I want to update the child (example: just the ‘Like’ part) of a single item in my list. I did some research on the subject. I can update the whole item. However, what I need is to update one child of the item. I need code snippet on this. I’m new here, thanks in advance.

Advertisement

Answer

Let’s say you have a class named User and you are passing an ArrayList(that contains different User objects) to the RecyclerView Adapter.

JavaScript

So for updating just the age, simply update that object present at that specific position in the list and then just refresh the RecyclerView.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement