Android 的 XML 属性中的问号 (?) [英] Question mark (?) in XML attributes for Android
本文介绍了Android 的 XML 属性中的问号 (?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能解释一下 Android XML 属性中问号的含义?
解决方案
问号表示它是对当前应用主题中资源值的引用.请参阅 linuxtopia Android 开发指南或<一个 href="http://developer.android.com/guide/topics/resources/accessing-resources.html#ReferencesToThemeAttributes" rel="noreferrer">android.com 开发指南了解更多信息.>
?
转义问号.
Can anyone explain the question mark means in Android XML attributes?
<TextView
style="?android:attr/windowTitleStyle"
More attributes
/>
解决方案
The question mark means it's a reference to a resource value in the currently applied theme. See the linuxtopia Android Dev Guide or the android.com Dev Guide for more about it.
?
escapes the question mark.
这篇关于Android 的 XML 属性中的问号 (?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文