如何在 API 级别 15 上设置字体系列?文档说 API 15does有 fontFamily 属性。我希望文档会说
“这在 API 级别 15 中已弃用。对于 API 级别 15 及更低级别,请参阅 [........]”
但他们没有。如何在 XML 中(或以编程方式)设置字体而不生成此警告?
这是 Ubuntu 上 Android Studio 的屏幕截图。
样式.xml:
http://developer.android.com/reference/android/widget/TextView.html http://developer.android.com/reference/android/widget/TextView.html
你错了你所看到的是class API
不是attribute
API级别:
You can 看这里 http://developer.android.com/reference/android/R.attr.html#fontFamily并且说:
public static final int fontFamily
Added in API level 16
字体系列实际上是从那时起创建的安卓4.1 http://developer.android.com/about/versions/android-4.1.html not in 4.0.3-4.0.4
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)