描述你的问题
刚做完的项目,事先没想到,后来有用户反馈内容没显示完整,最后发现他手机设置里面把字体大小调到最大了,字体调小之后就正常。现在是用这个方法不让app里面的字体大小改变,想问下有没有别的方法可以解决。
贴上相关代码
@Override
public Resources getResources() {
// TODO Auto-generated method stub
Resources res = super.getResources();
Configuration config = new Configuration();
config.setToDefaults();
res.updateConfiguration(config, res.getDisplayMetrics());
return res;
}
textSize uses dp as the unit
But it is not recommended to do this. To solve your problem, it is better to make the textview size adaptive and scrollable
Is this your question template for trolling? Why were the three, four and five points sent out without completing them?
The font size unit is dp