【发布时间】:2014-08-15 06:57:47
【问题描述】:
我想使用一种风格的 Android 库。我想我应该使用@(案例2)作为style属性,但我从网站上看到了一个示例,它使用?(案例1)。我不知道为什么。
Android 库是否包含名为 listSeparatorTextViewStyle 的资源和名为 listSeparatorTextViewStyle 属性的样式?是的,我确实在系统 android lib attrs.xml 中找到了名为 listSeparatorTextViewStyle 属性的样式,但是在哪里可以找到名为 listSeparatorTextViewStyle 的资源?
这里是代码和效果
案例 1
<TextView
android:id="@+id/dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?android:attr/listSeparatorTextViewStyle"
/>
案例 2
<TextView
android:id="@+id/dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@android:attr/listSeparatorTextViewStyle"
/>
【问题讨论】:
标签: android android-xml android-styles