Я пытаюсь разместить объект ImageView слева от объекта линейного макета (который является родителем двух кнопок). Я в основном хочу, чтобы две кнопки располагались по центру по горизонтали, а экран с изображением располагался слева от центрированных кнопок. Я по-прежнему хочу, чтобы кнопки оставались центрированными по горизонтали, размещенное изображение не должно быть центрировано, просто сбоку.
Любые предложения были бы действительно замечательными. Возможно, я подходил к своей проблеме с неправильными макетами, но вот что я пробовал:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/gameSettingsContainer"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.example.vb1115.multchoicequestion.LaunchScreen"
android:orientation="vertical"
android:gravity="center_horizontal">
<LinearLayout
android:id="@+id/buttonContainer"
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ToggleButton android:id="@+id/mathButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="Math"
android:textOn="Math"
android:text="Math"/>
<ToggleButton android:id="@+id/bioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="Biology"
android:textOn="Biology"
android:text="Biology"/>
</LinearLayout>
<ImageView
android:id="@+id/animatedArrow"
android:src="@mipmap/green_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@id/buttonContainer"/>
</RelativeLayout>