code: private void showPreferenceFragment(@NonNull final NavigationPreference navigationPreference,
                                          @NonNull final Fragment fragment) {
          fragment.setRetainInstance(true);
          FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
  
          if (!isSplitScreen()) {
              transaction.hide(navigationFragment);
  
              if (preferenceFragment != null) {
                  transaction.remove(preferenceFragment);
                  notifyOnPreferenceFragmentHidden(preferenceFragment);
              }
  
              transaction.add(R.id.navigation_fragment_container, fragment, PREFERENCE_FRAGMENT_TAG);
          } else {
              if (preferenceFragment != null) {
                  notifyOnPreferenceFragmentHidden(preferenceFragment);
              }
  
              transaction
                      .replace(R.id.preference_fragment_container, fragment, PREFERENCE_FRAGMENT_TAG);
          }
  
          transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
          transaction.commit();
          this.preferenceFragment = fragment;
          showToolbarNavigationIcon();
          adaptBreadCrumbVisibility(selectedPreferenceFragmentArguments);
          notifyOnPreferenceFragmentShown(navigationPreference, fragment);
      }
docs: Shows a specific preference fragment.
  
  @param navigationPreference
  The navigation preference, the fragment, which should be shown, is associated with,
  as an instance of the class {@link NavigationPreference}. The navigation preference
  may not be null
  @param fragment
  The fragment, which should be shown, as an instance of the class Fragment. The
  fragment may not be null