<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    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:background="@color/gbaBackground"
    android:layout_width="match_parent"
    android:layout_height="match_parent">


    <com.mrmichel.rustdroid_emu.ui.ScreenView
        android:id="@+id/gba_view"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginTop="16dp"
        android:layout_marginBottom="16dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="V, 3:2"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.0" />

    <include
        android:id="@+id/include"
        layout="@layout/dpad"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:alpha=".5"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent" />


    <Button
        android:id="@+id/buttonB"
        style="@style/Widget.AppCompat.Button.Small"
        android:layout_width="52dp"
        android:layout_height="54dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="32dp"
        android:background="@drawable/round_button"
        android:text="B"
        android:alpha=".5"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/buttonA"
        tools:text="B" />

    <Button
        android:id="@+id/buttonA"
        style="@style/Widget.AppCompat.Button.Small"
        android:layout_width="52dp"
        android:layout_height="54dp"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="48dp"
        android:background="@drawable/round_button"
        android:text="A"
        android:alpha=".5"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        tools:text="A" />

    <Button
        android:id="@+id/bSelect"
        style="@style/Widget.AppCompat.Button.Small"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:text="select"
        android:textSize="8dp"
        app:layout_constraintBottom_toTopOf="@+id/bStart"
        app:layout_constraintStart_toStartOf="parent" />

    <Button
        android:id="@+id/bStart"
        style="@style/Widget.AppCompat.Button.Small"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginBottom="20dp"
        android:text="start"
        android:textSize="8dp"
        app:layout_constraintBottom_toTopOf="@+id/include"
        app:layout_constraintStart_toStartOf="parent" />

    <Button
        android:id="@+id/buttonL"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:text="L"
        android:alpha=".5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <Button
        android:id="@+id/buttonR"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="8dp"
        android:text="R"
        android:alpha=".5"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ToggleButton
        android:id="@+id/tbTurbo"
        android:layout_width="98dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginBottom="16dp"
        android:checked="false"
        android:text="Turbo Mode"
        android:textOff="Turbo OFF"
        android:textOn="Turbo ON"
        app:layout_constraintBottom_toTopOf="@+id/bSelect"
        app:layout_constraintStart_toStartOf="parent" />


</androidx.constraintlayout.widget.ConstraintLayout>