Androidの相対レイアウトを作成しました。このレイアウトでは、アクティビティの4つの側面に4つの画像を表示し、トップバーと背景画像を表示しようとしています。
トップバーと背景画像が正しく表示されます。しかし、4つのうちNexusエミュレーターに表示されているのは2つの画像のみで、残りの2つの画像はエミュレーターに表示されません。画像を左、右の行、左、右の別の行に配置しました。
エミュレータの中央には左側の画像のみが表示され、右側の画像は両方とも表示されません。
ディスプレイに同じスペースですべての画像を表示するにはどうすればよいですか。私のレイアウトを以下に示します
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/background"
android:gravity="center_horizontal"
android:orientation="vertical"
tools:context=".MainActivity" >
<ImageView
android:id="@+id/topbannerimg"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="false"
android:layout_alignParentTop="true"
android:background="@drawable/topbanner"
android:contentDescription="@string/topbar"
android:src="@drawable/mtnlogotext" />
<ImageView
android:id="@+id/csrimg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/topbannerimg"
android:contentDescription="@string/csrstr"
android:src="@drawable/customerservice" />
<ImageView
android:id="@+id/virtualstoreimg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/topbannerimg"
android:contentDescription="@string/virstr"
android:src="@drawable/virtualstore" />
<ImageView
android:id="@+id/mtnstorelocatorimg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/csrimg"
android:contentDescription="@string/storestr"
android:src="@drawable/storelocater" />
<ImageView
android:id="@+id/mtnviewimg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/virtualstoreimg"
android:layout_toRightOf="@+id/mtnstorelocatorimg"
android:contentDescription="@string/viewstr"
android:src="@drawable/mtnview" />
</RelativeLayout>