Android中TextView的TextAppearance属性 [英] TextAppearance property of TextView in Android
问题描述
我正在开发 android 应用程序,我使用 TextView
在屏幕上显示文本.
I am working on android application where I am using TextView
to display the text on screens.
我将这个属性用于 TextView
来设置文本的大小 android:textAppearance="?android:attr/textAppearanceMedium"
.
I am using this property for the TextView
to set the size of the text android:textAppearance="?android:attr/textAppearanceMedium"
.
我是否还需要设置该文本的大小,还是由 Android 操作系统自动管理?
Do I need to set the size of that text also or it does automatically manage by Android OS ?
提前致谢.
推荐答案
在 Android 文本元素中,有一个首先应用的默认值(类似于网页).如果您希望覆盖这些并定义您自己的,那么您必须明确设置它们.android:textAppearance
就是这样的一种覆盖,但您还可以单独覆盖其他属性(而不是作为聚合)……您需要查看相关文档.
In Android text elements there is a default which is applied first (similar to webpages). If you wish to override those and define your own, then you must explicitly set them. android:textAppearance
is one such override, but there are other attributes you can override individually (as opposed to as an aggregate)... you'll want to see the documentation for that.
这篇关于Android中TextView的TextAppearance属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!