Please Refer to screen shot. Now my Problem is i have make a xml design that is like in screenshot. i have 4 relative layout contains imageview and textview. now i want to set these 4 relative layout horizontally with equal space from right,left,start,end. In my layout when it go on big screen the start and end showing extra space,i know i have set it like that. But Is there any solution to set these RLs automatic adjust there size according to screen size.
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/one"
android:id="@+id/RL_MainCat"
android:background="@color/white"
android:layout_marginTop="10dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/RL_UploadPres"
android:layout_marginLeft="10dp"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/upload_pres_icon"
android:id="@+id/icon_uploadpres"
android:layout_centerHorizontal="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Upload\nPrescription"
android:textAlignment="center"
android:textColor="#1f222d"
android:textSize="11sp"
android:layout_below="@+id/icon_uploadpres"
android:layout_marginTop="10dp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/RL_UploadPres"
android:id="@+id/RL_FindPharmacy"
android:layout_marginLeft="20dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/find_pharma_icon"
android:id="@+id/icon_findphar"
android:layout_centerHorizontal="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Find \n Pharmacy "
android:textAlignment="center"
android:textColor="#1f222d"
android:textSize="11sp"
android:layout_below="@+id/icon_findphar"
android:layout_marginTop="10dp"
android:layout_centerHorizontal="true"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/RL_FindPharmacy"
android:id="@+id/RL_BuyOTC"
android:layout_marginLeft="20dp"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/otc_icon"
android:id="@+id/icon_findotc"
android:layout_centerHorizontal="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Buy \n OTC "
android:textAlignment="center"
android:textColor="#1f222d"
android:textSize="11sp"
android:layout_below="@+id/icon_findotc"
android:layout_marginTop="10dp"
android:layout_centerHorizontal="true"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/RL_BuyMedicine"
android:layout_toRightOf="@+id/RL_BuyOTC"
android:layout_marginLeft="20dp"
android:layout_marginRight="10dp"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/medicine_icon"
android:id="@+id/icon_findmedi"
android:layout_centerHorizontal="true"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Buy \n Medicines "
android:textColor="#1f222d"
android:textSize="11sp"
android:textAlignment="center"
android:layout_marginTop="10dp"
android:layout_centerHorizontal="true"
android:layout_below="@+id/icon_findmedi"
/>
</RelativeLayout>
</RelativeLayout>