I am making a simple app in android studio, which includes two images filling up half of the screen, one on each side. Almost like a split screen. I have used this link: Make image appear half of the screen but it only makes an image appear on half of the screen when i want an image on either half. I would want something like this.
This is the code which i am using:
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5"
>
<ImageView
android:id="@+id/ImageView_swamp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:src="@drawable/img" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5"
/>
</LinearLayout>
Does anyone know what to do?