如何让用户能够选择字体?在“首选项”中,我想更改字体和字体列表。
我是这样设置字体的:
mTimerLabel = (TextView)findViewById(R.id.label);
Typeface typeface = Typeface.createFromAsset(getAssets(), "Fonts/digital-7i.ttf");
mTimerLabel.setTypeface(typeface);
最佳答案
您已经描述了在 textView 中更改字体的正确模型。我无法理解您遇到的问题。调用 textView 的首选项,选择字体(或其 ID)并进行设置。
关于Android选择自定义字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12709254/