默认值&“大"&“中&"的dpi值和“小型"文字检视Android [英] dpi value of default "large", "medium" and "small" text views android
问题描述
文档(或任何人)是否谈论默认的dpi值
Does the documentation ( or anyone) talks about the dpi values of the default
- 大TextView {
android:textAppearance="?android:attr/textAppearanceLarge"
} - 中等TextView {
android:textAppearance="?android:attr/textAppearanceMedium"
} - 小型TextView {
android:textAppearance="?android:attr/textAppearanceSmall"
}
- Large TextView {
android:textAppearance="?android:attr/textAppearanceLarge"
} - Medium TextView {
android:textAppearance="?android:attr/textAppearanceMedium"
} - Small TextView {
android:textAppearance="?android:attr/textAppearanceSmall"
}
SDK中的小工具吗?
widgets in the SDK ?
换句话说,我们可以在不使用android:textAppearance
属性的情况下复制这些文本视图的外观吗?
To put it in another way, can we replicate the appearance of these text views without using the android:textAppearance
attribute?
推荐答案
请参阅android sdk目录.
See in the android sdk directory.
在\platforms\android-X\data\res\values\themes.xml
中:
<item name="textAppearanceLarge">@android:style/TextAppearance.Large</item>
<item name="textAppearanceMedium">@android:style/TextAppearance.Medium</item>
<item name="textAppearanceSmall">@android:style/TextAppearance.Small</item>
在\platforms\android-X\data\res\values\styles.xml
中:
<style name="TextAppearance.Large">
<item name="android:textSize">22sp</item>
</style>
<style name="TextAppearance.Medium">
<item name="android:textSize">18sp</item>
</style>
<style name="TextAppearance.Small">
<item name="android:textSize">14sp</item>
<item name="android:textColor">?textColorSecondary</item>
</style>
TextAppearance.Large
表示样式是从TextAppearance
样式继承的,如果要查看样式的完整定义,也必须对其进行跟踪.
TextAppearance.Large
means style is inheriting from TextAppearance
style, you have to trace it also if you want to see full definition of a style.
链接: http://developer.android.com/design/style/typography. html
这篇关于默认值&“大"&“中&"的dpi值和“小型"文字检视Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!