我有一個背景圖像的相對佈局,但我想圖像填充所有的佈局空間,我認爲這是一個填充問題,我設置爲-1dip,不工作。 另外在將我的填充設置爲-1dip之前,當我用層次查看器檢查填充時。 這裏是我的xml相對佈局背景沒有填充所有空間
<RelativeLayout
android:id="@+id/relativeLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/gridView"
android:background="@drawable/tool_bar"
android:gravity="center"
>
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/locate" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/imageView1"
android:src="@drawable/orbit" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/imageView2"
android:src="@drawable/search" />
<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/imageView3"
android:src="@drawable/snap" />
<ImageView
android:id="@+id/imageView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/imageView4"
android:src="@drawable/profile" />
</RelativeLayout>
thanks
我想要背景圖像來填充相對佈局空間。而不是相對佈局來填充整個屏幕 – mauriyouth