android:background与android:src除了可以使用@drawable/xxyy之外,还可以使用颜色,@color/xxyy
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="#0a5321" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world" />
<ImageButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="#000000"
/>
</RelativeLayout>