固定了字体的大小后,使得app的字体大小不随手机本身的字体大小的改变而改变,通过以下方法实现:
哪个页面要固定就在那个页面的在onCreate() 里添加如下代码:
Resources res = getResources();
Configuration config=new Configuration();
config.setToDefaults();
res.updateConfiguration(config,res.getDisplayMetrics());
固定了字体的大小后,使得app的字体大小不随手机本身的字体大小的改变而改变,通过以下方法实现:
哪个页面要固定就在那个页面的在onCreate() 里添加如下代码:
Resources res = getResources();
Configuration config=new Configuration();
config.setToDefaults();
res.updateConfiguration(config,res.getDisplayMetrics());