I have two weeks trying to find a solution on how to resolve the last step. https://i.stack.imgur.com/jTz9b.jpg I add tickets (1 ticket 15 numbers) in database and than show in list view in fragment one, I want that when I check the toggle button in fragment two, for example 8, the text view 8 in tickets fragment change style. Please help me.
Asked
Active
Viewed 33 times
1 Answers
1
You can use "SharedPreference" you achieve that. When toggle is true, save a value on a SharedPreference, then check in other fragment if that value exist or not. If true and matches the value, then you do wherever you want.
You could also remove the Shared if toggle is false to avoid problems.

Mariano Zorrilla
- 7,165
- 2
- 34
- 52
-
can you give me an example please? – androidlover Aug 30 '15 at 17:57
-
Here is how to save and retrieve: [Save SharedPreference](http://stackoverflow.com/a/3624311/3743245) and here is an example of how to remove it: [Remove SharedPreference](http://stackoverflow.com/a/3687333/3743245) – Mariano Zorrilla Aug 30 '15 at 18:25