My application settings can be opened and closed using the hardware menu button (as well as the "Back" button when navigating the root screen). There are many child screens in these settings. (And let's say there are two types of activity - the main one and settings).
I would like for me to return to the last settings screen, with which I worked when I again get access to the application settings.
Saving the last setPreferenceScreen(lastPreferenceScreenKey) preference key and using setPreferenceScreen(lastPreferenceScreenKey) does not matter, since in this case I cannot navigate the hierarchy.
Setting PreferenceActivity.launchMode="singleTask" and starting the main action when the user clicks the menu button did not help - when I run the settings again, its root screen will appear.
Is this possible anyway?
source share