Some items of the action bar item were to be shown in the some fragment (which is the switch button), if Switch Button state is changed, the same layout then goes forward and then comes back then it comes to its initial state.
Asked
Active
Viewed 64 times
1

Farzan Siddiqui
- 68
- 1
- 6
1 Answers
1
You can use the sharedpreferences for save state of switch button and then checked it value as the fragment page has changed.
https://developer.android.com/reference/android/content/SharedPreferences
https://www.journaldev.com/9412/android-shared-preferences-example-tutorial

Javad A salehi
- 31
- 1
- 6