1

I have a listitem which has like option if the user clicks the list item it details activity opens if user clicks like option in details activity i want my listitem like state to be changed when used presses back button. how to do it in easy way?

SHASHIDHAR MANCHUKONDA
  • 3,307
  • 2
  • 17
  • 39

1 Answers1

1

You can use a boolean for each item to save this condition, and If you are using a custom adapter for the listitems, then you can check in the getView method this value and change the state of the option.

Here you have an example about the BaseAdapter and a custom implementation.

Community
  • 1
  • 1
Marcos B.
  • 425
  • 7
  • 16