Good evening guys.
My scenario is as follows: In Activity A, I populate a list through a RecycleView with an ArrayList returned from my WebService. The layout of this list has an image, title, and button for each item. The button plays the role of follow / unfollow, that is when it is clicked (it changes its icon and saved the status via webservice), it follows or stops following another user from the list. When I click on the image, I go to the User Profile for the list item. Okay, so good, working perfectly.
When I enter the User profile (Activity B), there is also the follow / unfollow button. So basically, if the follow / unfollow button is clicked on the user profile (Activity B), and the person returns the list of users (Activity A), the value of the button for the item is updated in the list. >
I thought of using startActivityForResult, but I can not call it inside my adapter which is where I handle the onclick of the button and the image. And I would not like to reload the list on ActivityA's onResume.
Does anyone have an idea?