<?xml version="1.0" encoding="utf-8"?>
<layout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <data/>
    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:alpha="0.15"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/logo"
            android:paddingBottom="100dp"
            />
        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingBottom="100dp"
            android:clipToPadding="false"
            android:layout_marginTop="5dp"
            android:layout_marginBottom="5dp"
            android:layout_marginEnd="10dp"
            android:layout_marginStart="10dp"
            android:fadeScrollbars="false"
            >
            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                >

                <ProgressBar
                    android:id="@+id/loading_progress"
                    android:layout_gravity="center"
                    android:layout_width="50dp"
                    android:layout_height="50dp"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintBottom_toTopOf="@id/loading_channels"
                    />
                <TextView
                    android:id="@+id/loading_channels"
                    android:gravity="center"
                    android:text="@string/loading_channels"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    />
                <TextView
                    android:id="@+id/live_disabled"
                    android:textColor="#FF0000"
                    android:layout_gravity="center"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:text="@string/live_disabled"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintBottom_toBottomOf="parent"
                    android:layout_margin="5dp"/>

                <TextView
                    android:id="@+id/error"
                    android:textColor="#FF0000"
                    android:layout_gravity="center"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>

                <TextView
                    android:id="@+id/title"
                    android:text="@string/stream_title"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/error"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>
                <EditText
                    android:id="@+id/live_title"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/title"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"
                    android:singleLine="true"/>
                <TextView
                    android:id="@+id/title_error"
                    android:text="@string/stream_title_error"
                    android:textColor="#FF0000"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/live_title"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>
                <TextView
                    android:id="@+id/channel"
                    android:text="@string/choose_channel"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/title_error"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>
                <Spinner
                    android:id="@+id/channel_list"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/channel"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"
                    />
                <TextView
                    android:id="@+id/privacy"
                    android:text="@string/stream_privacy"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/channel_list"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>
                <Spinner
                    android:id="@+id/privacy_list"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/privacy"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"
                    />

                <TextView
                    android:id="@+id/resolution"
                    android:text="@string/stream_resolution"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/privacy_list"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>
                <Spinner
                    android:id="@+id/resolution_list"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:entries="@array/stream_resolution"
                    app:layout_constraintTop_toBottomOf="@id/resolution"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"
                    />

                <LinearLayout
                    android:id="@+id/save_replay_layout"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    app:layout_constraintTop_toBottomOf="@id/resolution_list"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    >
                    <TextView
                        android:id="@+id/save_replay_title"
                        android:text="@string/save_replay"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:layout_margin="5dp"
                        android:layout_weight="50"/>
                    <androidx.appcompat.widget.AppCompatCheckBox
                        android:id="@+id/save_replay"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_margin="5dp"
                        android:layout_weight="50"
                        />
                </LinearLayout>
                <TextView
                    android:id="@+id/save_replay_info"
                    android:text="@string/save_replay_info"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/save_replay_layout"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>

                <TextView
                    android:id="@+id/advance_settings"
                    android:text="@string/advanced_settings"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/save_replay_info"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_marginTop="10dp"
                    android:layout_marginBottom="10dp"
                    android:layout_marginStart="5dp"
                    android:layout_marginEnd="5dp"/>
                <TextView
                    android:id="@+id/category"
                    android:text="@string/stream_category"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/advance_settings"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>
                <Spinner
                    android:id="@+id/category_list"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/category"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"
                    />

                <TextView
                    android:id="@+id/licence"
                    android:text="@string/stream_licence"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/category_list"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>
                <Spinner
                    android:id="@+id/licence_list"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/licence"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"
                    />
                <TextView
                    android:id="@+id/language"
                    android:text="@string/stream_language"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/licence_list"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>
                <Spinner
                    android:id="@+id/language_list"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/language"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"
                    />
                <TextView
                    android:id="@+id/description_title"
                    android:text="@string/description"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/language_list"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"/>
                <EditText
                    android:id="@+id/description"
                    android:layout_width="0dp"
                    android:layout_height="150dp"
                    app:layout_constraintTop_toBottomOf="@id/description_title"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    android:layout_margin="5dp"
                    android:inputType="textMultiLine"
                    android:lines="4"
                    android:gravity="top|start"
                    />
                <androidx.appcompat.widget.LinearLayoutCompat
                    android:id="@+id/comments_layout"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    app:layout_constraintTop_toBottomOf="@id/description"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    >
                    <TextView
                        android:id="@+id/comments_enabled_title"
                        android:text="@string/comments_enabled"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:layout_margin="5dp"
                        android:layout_weight="50"/>
                    <androidx.appcompat.widget.AppCompatCheckBox
                        android:id="@+id/comments_enabled"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_margin="5dp"
                        android:layout_weight="50"
                        />
                </androidx.appcompat.widget.LinearLayoutCompat>
                <androidx.appcompat.widget.LinearLayoutCompat
                    android:id="@+id/download_layout"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    app:layout_constraintTop_toBottomOf="@id/comments_layout"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    >
                <TextView
                    android:id="@+id/download_enabled_title"
                    android:text="@string/download_enabled"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:layout_margin="5dp"
                    android:layout_weight="50"/>
                <androidx.appcompat.widget.AppCompatCheckBox
                    android:id="@+id/download_enabled"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="5dp"
                    android:layout_weight="50"
                    />
                </androidx.appcompat.widget.LinearLayoutCompat>
                <LinearLayout
                    android:id="@+id/nfsw_layout"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    app:layout_constraintTop_toBottomOf="@id/download_layout"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    >
                <TextView
                    android:id="@+id/nsfw_title"
                    android:text="@string/nsfw"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:gravity="center_vertical"
                    android:layout_margin="5dp"
                    android:layout_weight="50"/>
                <androidx.appcompat.widget.AppCompatCheckBox
                    android:id="@+id/nsfw"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="5dp"
                    android:layout_weight="50"
                    />
                </LinearLayout>

            </androidx.constraintlayout.widget.ConstraintLayout>
        </ScrollView>
        <com.google.android.material.bottomappbar.BottomAppBar
            android:id="@+id/bottom_bar"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            style="@style/Widget.MaterialComponents.BottomAppBar.Colored"
            android:layout_gravity="bottom"
            />
        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/go_live"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:srcCompat="@drawable/ic_baseline_broadcast_24"
            app:layout_anchor="@id/bottom_bar"
            />
    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>