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 to try and solve my problem; however, it only made the top half of the screen filled with an image and when i tried repeating the code it divided the screen into 3 parts with one more empty space. This is the code which is responsible for that:
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<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:rotation="-180"
android:src="@drawable/img" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.5"
/>
</LinearLayout>
Any suggestions?