默认“大"、“中"的 dpi 值和“小"文本视图 android [英] dpi value of default "large", "medium" and "small" text views android

查看:21
本文介绍了默认“大"、“中"的 dpi 值和“小"文本视图 android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文档(或任何人)是否讨论了默认的 dpi 值

Does the documentation ( or anyone) talks about the dpi values of the default

  • 大文本视图 {android:textAppearance="?android:attr/textAppearanceLarge"}
  • 中文本视图 {android:textAppearance="?android:attr/textAppearanceMedium"}
  • 小文本视图 { android:textAppearance="?android:attr/textAppearanceSmall"}

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.

platformsandroid-Xdata esvalues hemes.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>

platformsandroid-Xdata esvaluesstyles.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆