在 Android 中更改 EditText 的字体? [英] Change font for EditText in Android?
本文介绍了在 Android 中更改 EditText 的字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以在 Android 中更改 EditText 的字体?我希望它与我为所有 textView 设置的字体相匹配.
Is there any way to change the font for a EditText in Android? I want it to match the font's I set for all my textViews.
推荐答案
editText.setTypeface(Typeface.SERIF);
和 TextView 一样.
As like as for TextView.
<TextView
...
android:typeface="serif"
... />
上面是 XML
这篇关于在 Android 中更改 EditText 的字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文