When testing a android.preference.PreferenceActivity, I get the following warning:
warning: [deprecation] getFragmentManager() in Activity has been deprecated
That is how I obtain a handle to the current PreferenceFragment:
FragmentManager fm = this.mActivity.getFragmentManager();
this.currentFragment = (PreferenceFragment) fm.getFragments().get(1);
Using FragmentActivity.getSupportFragmentManager() is obviously not an option.
I've found PreferenceFragmentCompat, which would replace the deprecated PreferenceFragment.
But is there any androidx replacement for the PreferenceActivity?