デフォルトの「大」、「中」、「小」テキストビューのdpi値 Android 質問する

デフォルトの「大」、「中」、「小」テキストビューのdpi値 Android 質問する

ドキュメント(または誰か)はデフォルトのdpi値について言及していますか?

  • 大きなテキストビュー { android:textAppearance="?android:attr/textAppearanceLarge"}
  • 中サイズのテキストビュー { android:textAppearance="?android:attr/textAppearanceMedium"}
  • 小さいテキストビュー { android:textAppearance="?android:attr/textAppearanceSmall"}

SDK のウィジェットですか?

大、中、小、通常のテキストビュー

言い換えれば、android:textAppearance属性を使用せずにこれらのテキスト ビューの外観を複製することはできますか?

ベストアンサー1

Android SDK ディレクトリを参照してください。

\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スタイルから継承されることを意味します。スタイルの完全な定義を確認する場合は、これもトレースする必要があります。

リンク:http://developer.android.com/design/style/typography.html

おすすめ記事