I have created Spinner with the list of Font Sizes from \"8\" to \"46\" . I could be able to click the font Size and in a spinner it has shown me .
My need is, if i
you can scale to text size of your app up/down using base activity Configuration, make all activities inherent base activity.
Scale normal value is 1.0, 2.0 would double the font size and .50 would make it half.
public void adjustFontScale( Configuration configuration,float scale) {
configuration.fontScale = scale;
DisplayMetrics metrics = getResources().getDisplayMetrics();
WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
wm.getDefaultDisplay().getMetrics(metrics);
metrics.scaledDensity = configuration.fontScale * metrics.density;
getBaseContext().getResources().updateConfiguration(configuration, metrics);
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
adjustFontScale( getResources().getConfiguration());
}