1

I have a recyclerview. With on item click on the recyclervie, which I have done in the adapter as viewholder on click listener, will go to a separate activity for result and will return an object to the activity with the recyclerview. How can I update the clicked item on the recyclerview with the updated one from activity result?

Hanson
  • 35
  • 4

1 Answers1

0

After closing the second activity you need to update the dataset, used by RecyclerView and its adapter. Do it in the onActivityResult() method of the first activity. Then call notifyDataSetChanged() or better notifyItemChanged(int position) to redraw the changed element.