android - 如何创建一个 TextAppearance 使用比@android :attr/textAppearanceSmall 更小的字体大小

标签 android

我正在尝试按照此创建自己的文本外观

http://brainflush.wordpress.com/2009/03/15/understanding-android-themes-and-styles/

我只想要我的文本外观样式,它继承了@android:attr/textAppearanceSmall 的所有东西,除了它使用比 attr/textAppearanceSmall 更小的尺寸

所以我这样做了:

<resource>
  <style name="MyDefaultTextAppearance" parent="@android:attr/textAppearanceSmall">
    <item name="android:textSize">10sp</item>
  </style>

</resources>

我的问题是平板电脑的 textAppearanceSmall 的 textSize 是多少?我只想为 textAppearanceSmall 使用小于 android 默认文本大小的大小。我不确定 textSize 10sp 是否是正确答案。

谢谢。

最佳答案

如果查看 SDK 文件夹,您会发现没有为平板电脑定义的单独的 TextAppearance 样式。我检查了 android-14 文件夹,但找不到用于 large 屏幕的单独条目。请自行搜索。您可以在 \android-sdk\platforms\android-14\data\res

中找到资源

关于android - 如何创建一个 TextAppearance 使用比@android :attr/textAppearanceSmall 更小的字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8070982/

相关文章:

android - 启用 largeHeap 的位图回收

java - Android ArrayAdapter 不显示每行中的所有数据

java - Eclipse 3.6 在 Content Assist 期间经常停顿

java - 标准 zip 实用程序无法解压缩由 java.util.zip 压缩的文件

android - Eclipse IDE - 并排的 Android 图形布局和 XML 布局

android - Android Studio 是否有 Hierarchy Viewer 或 Layout Inspector?

java - 如何获取 UTC 格式的年、月、日?

android - 我无法在Android Studio中通过Gradle导入库

android - 当按下返回按钮时,启动画面退出并打开身份验证 Activity

android fragment 上的逐帧动画