小部件中文字大小设置了dp,字体大小不会跟随系统改变
正常的
调整了大小后的
求解答!
小部件中文字大小设置了dp,字体大小不会跟随系统改变
正常的
求解答!
在对应Activity中重写一下方法,在你写的BaseActivity中也可以。(源自于CSDN搜索相关问题的答案)
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(getConfigurationContext(newBase));
}
private static Context getConfigurationContext(Context context) {
Configuration configuration = context.getResources().getConfiguration();
configuration.fontScale = 1;
return context.createConfigurationContext(configuration);
}