在xml文件中引用属性资源。
@+id 申明一个id值来标识组件
@id 通过id值引用组件
@android:id 通过id值引用android系统自带的组件资源
@+id 申明一个id值来标识组件
@id 通过id值引用组件
@android:id 通过id值引用android系统自带的组件资源
?android:attr 引用android预定义的样式
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="文本一"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/text" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/text"
android:src="@android:drawable/ic_dialog_email"
android:id="@+id/image" />
</RelativeLayout>