看到下面这一段代码,请问
"?android:attr/textAppearanceLarge"有具体值没?如何查它的具体值啊?
我查到如下一段注释:
public static final int textAppearanceLarge
Text color, typeface, size, and style for "large" text. Defaults to primary text color.
Must be a reference to another resource, in the form "@[+][package:]type:name" or to a theme attribute in the form "?[package:][type:]name".
请问: [package:][type:] 中"[]"表示什么意思?? ":"又表示什么意思呢?
第二个加粗的地方 type 加上了[]表示什么意思呢?
谢谢....
- XML code
<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/text1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:gravity="center_vertical" android:paddingLeft="6dip" android:minHeight="?android:attr/listPreferredItemHeight" />
------解决方案--------------------
mark
android:minHeight="?android:attr/listPreferredItemHeight"
我猜测:
listPreferredItemHeight应该是个常量,具体的值可能在环境里面的某个配置文件中
1>[]应该是个分隔符号吧,用来解析字段;
2>:和上面差不多吧;
期待正确的解释
------解决方案--------------------
[package:][type:]
你看看DOS的语法
------解决方案--------------------
:不就是分隔加标识?
至于textAppearanceLarge你去attr.xml,styles.xml,themems.xml里肯定可以找到。
------解决方案--------------------
A:B:C
就是:首先是分隔ABC的,然后A,B就相当于c++的namespace...就是这个C是B的C,B是A的B。
------解决方案--------------------
不客气。@和?我也没注意,刚查了一下。http://developer.android.com/guide/topics/resources/resources-i18n.html <References to Theme Attributes>,说?是去Theme里找。