My PreferenceActivity looks like:
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.
With the addition of font support in android O, we can now set a font-family to app theme and that would automatically reflect in the PreferenceFragment as well. (Note: I am using PreferenceFragmentCompat). First add a font-family to the resources like this:
NOTE: You would need both app and android namespace declarations as of now Link
Then add a style for the text view mentioning this font-family for the TextView:
And then finally, just refer to the above style in your AppTheme like this:
Done. This will show the customised font in your PreferenceFragmentCompat as well.