为什么“@string/”属性没有+号?
Why doesn't the "@string/" attribute not have a + sign?
我知道视图的 id
属性中的 +
符号表示它是一个新的用户定义的自定义值,必须添加到 R.Java
文件中。但是,在下面的示例 XML Button View 属性中,为什么 @string
不像 @+id
属性那样在单词 string
之前有 +
符号?
<Button android:id="@+id/my_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/my_button_text"/>
我知道视图的 id
属性中的 +
符号表示它是一个新的用户定义的自定义值,必须添加到 R.Java
文件中。但是,在下面的示例 XML Button View 属性中,为什么 @string
不像 @+id
属性那样在单词 string
之前有 +
符号?
<Button android:id="@+id/my_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/my_button_text"/>