I am new to Android. I have multiple image views in an activity and will be adding more. I'm using these image views as buttons. The problem I'm having is getting them to all fit correctly and scale according to the screen size. Can I get some help with this?
Here is the XML:
<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" >
<ImageView
android:id="@+id/homeBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:scaleType="centerCrop"
android:src="@drawable/homebackground" />
<ImageView
android:id="@+id/publicAffairs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:src="@drawable/publicaffairs" />
<ImageView
android:id="@+id/actionAlerts"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginTop="5dp"
android:layout_marginLeft="1dp"
android:layout_toRightOf="@+id/publicAffairs"
android:src="@drawable/actionalerts" />
</RelativeLayout>
The two image views I'm using as buttons don't scale according to device size.