我现在正在修改自定义首选项,我想使用 TextView 为其添加标签。但是我似乎找不到使用 setTextView() 将文本大小指定为“大”的方法
我在这里错过了什么?
最佳答案
TextView title = new TextView(context);
title.setTextAppearance(context, android.R.attr.textAppearanceLarge);
或者试试
setTextAppearance(context, android.R.style.TextAppearance_Large);
使用上面的代码试试
关于android - 以编程方式使用 setTextSize 到 ?attr/textAppearanceLarge,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10178024/