Open a fragment from a fragment Preferences; Change the layout of the action bar from the settings sub-screen on Android

  • I have a PreferenceFragment added to the action, so I see my settings (and most importantly, I see my own action bar). But this snippet has nested preference screens inside, and when I click one of them, then the action bar changes to the default value (the nested preference screen is probably a new activity?).

    How can I stay with the custom set action bar?

  • In this PreferencesFragment I need to have an “About Us” button that displays some text (so probably show a different framework).

+4
source share
1 answer

OK. I did a crawl, for preference screens, I created a user activity, which I start with the settings, and this activity has another fragment of preferences in it, based on the intention extra

Sources for this: Android: run Activity from preferences.xml Is there a way to put additional settings in the setting?

If someone has a better solution, I will be glad to accept, this is the answer, but until then I will go with mine :)

+3
source

Source: https://habr.com/ru/post/1501068/


All Articles