I have created android relative layout , in which , I am trying to show four images in the four sides of the activity with a top bar and background image.
topbar and backgroud image appearing correctly. but , among 4 only 2 images are displaying in the Nexus emulator, remaing 2 images are not visible in the emulator, I have aligned image to left,right in row and left, right in another row.
only left side images are displayed at the center of the emulator, both right side images are not visible.
How can I display all images with equal space on the display. My layout is shown below
<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>
I modified your code just replace icon image with your actual image.
I’m not sure about layout design, so please upload image what the layout you want.