<?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:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    tools:context="com.android.media.samplevideoencoder.MainActivity">

    <com.android.media.samplevideoencoder.AutoFitTextureView
        android:id="@+id/texture"
        android:layout_width="wrap_content"
        android:layout_height="300dp"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_marginBottom="16dp"
        android:gravity="center"
        app:layout_constraintBottom_toTopOf="@+id/checkBox_media_recorder"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <CheckBox
        android:id="@+id/checkBox_media_recorder"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="90dp"
        android:layout_marginTop="10dp"
        android:fontFamily="sans-serif-medium"
        android:text="@string/media_recorder"
        android:textAppearance="@style/TextAppearance.AppCompat.Large"
        android:textStyle="normal"
        android:checked="true"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/texture"/>

    <CheckBox
        android:id="@+id/checkBox_media_codec"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="90dp"
        android:fontFamily="sans-serif-medium"
        android:text="@string/media_codec"
        android:textAppearance="@style/TextAppearance.AppCompat.Large"
        android:textStyle="normal"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/checkBox_media_recorder" />

    <RadioGroup
        android:id="@+id/radio_group_mime"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="40dp"
        android:layout_marginTop="10dp"
        android:orientation="vertical"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toTopOf="@+id/frameLayout2"
        app:layout_constraintTop_toBottomOf="@+id/checkBox_media_codec">

        <RadioButton
            android:id="@+id/avc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:checked="true"
            android:text="@string/avc" />

        <RadioButton
            android:id="@+id/hevc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/hevc" />
    </RadioGroup>

    <RadioGroup
        android:id="@+id/radio_group_codec"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="40dp"
        android:orientation="vertical"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/checkBox_media_codec">

        <RadioButton
            android:id="@+id/hw"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:checked="true"
            android:enabled="false"
            android:text="@string/hardware" />

        <RadioButton
            android:id="@+id/sw"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:enabled="false"
            android:text="@string/software" />
    </RadioGroup>

    <FrameLayout
        android:id="@+id/frameLayout2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/radio_group_mime"
        android:layout_alignParentStart="true"
        android:layout_alignParentBottom="true"
        android:layout_marginTop="10dp"
        android:background="@color/colorPrimary"
        app:layout_constraintTop_toBottomOf="@+id/radio_group_mime"
        tools:layout_editor_absoluteX="80dp">

        <Button
            android:id="@+id/start_button"
            android:layout_width="108dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:text="@string/start_button"
            tools:layout_editor_absoluteX="155dp"
            tools:layout_editor_absoluteY="455dp" />

    </FrameLayout>

    <TextView
        android:id="@+id/textViewResults"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:fontFamily="sans-serif-medium"
        android:textSize="18sp"
        android:textStyle="normal"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf = "@+id/frameLayout2" />

</androidx.constraintlayout.widget.ConstraintLayout>
