Like Unlike Button RecyclerView Image
I have an android app in which users can like and unlike an image.I'm using recyclerView.I Just disable the button(Like/Unlike) once user clicked. Problem, when I click on button l
Solution 1:
I answered this type of questions over and over. You didn't search enough and you didn't understand how ListView or RecycleView works. Changing current state of views ( such as changing text of TextView or changing resource of ImageView) is the wrong thing. You need data set (a list related to items in ListView) and you need to change corresponding data of the list and call notifyDataSetChanged() method of your adapter.
Don't forget. getView() method of your adapter is called every time any view of your list become on the screen and if you update only the view (instead of change data) your view will show the past value of item because your data didn't changed.
Look link below and search much more about how ListView and RecycleView works.
Post a Comment for "Like Unlike Button RecyclerView Image"