<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#73000000"
    android:clickable="true"
    android:focusable="true">

    <LinearLayout
        android:id="@+id/linear_top"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginTop="7dp"
        android:layout_marginEnd="12dp"
        android:gravity="center"
        android:orientation="horizontal"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <ImageButton
            android:id="@+id/button_close_language_settings"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:background="@android:color/transparent"
            android:contentDescription="@string/close_player"
            android:padding="10dp"
            android:scaleType="fitXY"
            app:srcCompat="@drawable/ic_baseline_arrow_back_24" />

        <TextView
            android:id="@+id/exo_text_language"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginEnd="44dp"
            android:textAlignment="center"
            android:textColor="@color/player_white"
            android:textSize="18sp"
            android:textStyle="bold" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:orientation="horizontal"
        app:layout_constraintBottom_toTopOf="@+id/linear_bottom"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/linear_top">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical">

            <TextView
                android:id="@+id/text_audio"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/audio"
                android:textAlignment="center"
                android:textColor="@color/player_white"
                android:textSize="18sp"
                android:textStyle="bold" />

            <ScrollView
                android:id="@+id/scroll_audio_languages"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:contentDescription="@string/audio">

                <LinearLayout
                    android:id="@+id/linear_audio_languages"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="56dp"
                    android:layout_marginEnd="56dp"
                    android:orientation="vertical" />
            </ScrollView>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical">

            <TextView
                android:id="@+id/text_subtitles"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/subtitles"
                android:textAlignment="center"
                android:textColor="@color/player_white"
                android:textSize="18sp"
                android:textStyle="bold" />

            <ScrollView
                android:id="@+id/scroll_subtitle_languages"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:contentDescription="@string/subtitles">

                <LinearLayout
                    android:id="@+id/linear_subtitle_languages"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="56dp"
                    android:layout_marginEnd="56dp"
                    android:orientation="vertical" />
            </ScrollView>
        </LinearLayout>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/linear_bottom"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:layout_marginBottom="7dp"
        android:gravity="end"
        android:orientation="horizontal"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <com.google.android.material.button.MaterialButton
            android:id="@+id/button_cancel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="7dp"
            android:text="@string/cancel"
            android:textAllCaps="false"
            android:textColor="@color/player_white"
            android:textSize="16sp"
            app:backgroundTint="@color/buttonBackgroundLight"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/button_select"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/apply"
            android:textAllCaps="false"
            android:textColor="@color/themePrimaryDark"
            android:textSize="16sp"
            app:backgroundTint="@color/buttonBackgroundDark"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:ignore="TextContrastCheck" />

    </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>