【发布时间】:2021-01-04 05:43:37
【问题描述】:
我正在尝试使用这样的字体更改我的文本视图的字体
Typeface tf = Typeface.createFromAsset(context.getAssets(), "fontName.ttf"));
TextView textView = (TextView) findViewById(R.id.textView1);
textView.setTypeface(tf);
但是华为设备有一个字体样式自定义,如果你在那里改变字体,它会改变整个设备的字体,包括我的 textView 我怎样才能防止这种情况发生?
【问题讨论】:
标签: android android-fonts android-typeface