What to use instead of "addPreferencesFromResource" in a PreferenceActivity?
Asked 07 September, 2021
Viewed 1.6K times
  • 58
Votes

I just noticed the fact that the method addPreferencesFromResource(int preferencesResId) is marked deprecated in Android's documentation (Reference Entry).

Unfortunately, no alternative method is provided in the method's description.

Which method should be used instead in order to connect a preferenceScreen.xml to the matching PreferenceActivity?

6 Answer