1

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.enter image description here

1 Answers1

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