0

I'm new to Android programming and I have implemented a navigation bar to switch between fragments.

FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
ItemFragment fragment = new ItemFragment();
transaction.replace(R.id.container, fragment);
transaction.commit();

But now I added a settings Button in the nav bar to get to a settingsFragment, which is implemented using preferenceFragment from android.preference.PreferenceFragment. Unfortunately this collides with android.support.v4.app.Fragment. So I am wondering if this is even the right way to do it. My question is, what construct should I use, to get to settings from the navigation bar (as in most google apps). Is it even prefenceFragment or something else?

Greets

edit: Found a solution here Android: Preference Fragment with a Navigation Drawer's Fragment

Community
  • 1
  • 1
MindlessMaik
  • 271
  • 2
  • 5
  • 16

0 Answers0