<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:fillViewport="true">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="12dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingBottom="8dp"
                android:text="@string/cast_settings_title"
                android:textSize="20sp"
                android:textStyle="bold" />

            <include
                android:id="@+id/header_global"
                layout="@layout/include_settings_section_header"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_username" />

            <EditText
                android:id="@+id/edit_username"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="textPersonName"
                android:maxLines="1" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/pin_hint" />

            <EditText
                android:id="@+id/edit_settings_pin"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/pin_anonymous_hint"
                android:inputType="numberPassword"
                android:maxLength="32" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_theme" />

            <Spinner
                android:id="@+id/spinner_theme"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_language" />

            <Spinner
                android:id="@+id/spinner_language"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <CheckBox
                android:id="@+id/check_tray_icon"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:checked="true"
                android:text="@string/label_show_tray_icon" />

            <CheckBox
                android:id="@+id/check_send_crash_logs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:checked="true"
                android:text="@string/label_send_anonymous_crash_logs" />

            <include
                android:id="@+id/header_sender"
                layout="@layout/include_settings_section_header"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_capture_mode" />

            <Spinner
                android:id="@+id/spinner_sender_capture_mode"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_resolution" />

            <Spinner
                android:id="@+id/spinner_sender_resolution"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_network_adoption" />

            <Spinner
                android:id="@+id/spinner_sender_network"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_bitrate_mode" />

            <Spinner
                android:id="@+id/spinner_sender_bitrate"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_video_codec" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/codec_hint_negotiated"
                android:textSize="12sp" />

            <Spinner
                android:id="@+id/spinner_sender_video_codec"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_transport" />

            <Spinner
                android:id="@+id/spinner_sender_transport"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_audio" />

            <Spinner
                android:id="@+id/spinner_sender_audio"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_audio_codec" />

            <Spinner
                android:id="@+id/spinner_sender_audio_codec"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:id="@+id/text_sender_audio_hint"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textSize="12sp"
                android:visibility="gone" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_stream_protection" />

            <TextView
                android:id="@+id/text_stream_protection_hint"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/stream_protection_hint"
                android:textSize="12sp" />

            <Spinner
                android:id="@+id/spinner_sender_stream_protection"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <include
                android:id="@+id/header_receiver"
                layout="@layout/include_settings_section_header"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <CheckBox
                android:id="@+id/check_receiver_pip"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_receiver_pip" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/receiver_pip_hint"
                android:textSize="12sp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_transport" />

            <Spinner
                android:id="@+id/spinner_receiver_transport"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_network_adoption" />

            <Spinner
                android:id="@+id/spinner_receiver_network"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_video_codec" />

            <Spinner
                android:id="@+id/spinner_receiver_video_codec"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/label_receiver_audio" />

            <Spinner
                android:id="@+id/spinner_receiver_play_audio"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
        </LinearLayout>
    </ScrollView>

    <View
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:layout_marginStart="12dp"
        android:layout_marginEnd="12dp"
        android:background="@drawable/settings_app_info_divider" />

    <include
        layout="@layout/include_app_info_section"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
</LinearLayout>
