样式属性不使用 android: 命名空间前缀的原因 [英] Reason why style attribute does not use the android: namespace prefix

查看:18
本文介绍了样式属性不使用 android: 命名空间前缀的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android中style属性不使用android:命名空间前缀的原因是什么?

In Android what is the reason that the style attribute does not use the android: namespace prefix?

看看 style 是如何不以 android: 开头的?有人知道为什么吗?

See how style doesn't start with android:? Anyone know why?

<TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="I Love Android!"
        style="@android:style/TextAppearance.Large"
        />

http://developer.android.com/guide/topics/ui/主题.html

谢谢!

推荐答案

来自 文档:

注意:style 属性不使用 android: 命名空间前缀.

Note: The style attribute does not use the android: namespace prefix.

style 不使用 android 命名空间前缀的原因是它是现有 XML 属性的一部分.

The reason style doesn't use the android namespace prefix is because it is part of the stock XML attributes.

这篇关于样式属性不使用 android: 命名空间前缀的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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