I have a MyFragment which is extended from PreferenceFragmentCompat and using setPreferencesFromResource (R.xml.preferences, rootKey) to s
setPreferencesFromResource (R.xml.preferences, rootKey)