<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="wrap_content"
    android:orientation="vertical">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/bugReportToolbar"
        style="@style/VectorToolbarStyle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:elevation="4dp" />

    <LinearLayout
        android:id="@+id/bug_report_body_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:orientation="vertical">

        <TextView
            android:id="@+id/bug_report_progress_text_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="10dp"
            android:layout_marginEnd="10dp"
            android:text="@string/send_bug_report_progress"
            android:textColor="?riotx_text_primary"
            android:visibility="gone"
            tools:visibility="visible" />

        <ProgressBar
            android:id="@+id/bug_report_progress_view"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="match_parent"
            android:layout_height="20dp"
            android:layout_gravity="center_vertical"
            android:layout_marginStart="10dp"
            android:layout_marginEnd="10dp"
            android:max="100"
            android:visibility="gone"
            tools:progress="70"
            tools:visibility="visible" />

        <ScrollView
            android:id="@+id/bug_report_scrollview"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:descendantFocusability="beforeDescendants"
                android:focusableInTouchMode="true"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/bug_report_first_text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dp"
                    android:layout_marginEnd="10dp"
                    android:text="@string/send_bug_report_description"
                    android:textColor="?riotx_text_primary" />

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/bug_report_text_input_layout"
                    style="@style/VectorTextInputLayout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dp"
                    android:layout_marginTop="10dp"
                    android:layout_marginEnd="10dp"
                    android:hint="@string/send_bug_report_placeholder"
                    android:textColorHint="?attr/vctr_default_text_hint_color"
                    app:counterEnabled="true"
                    app:counterMaxLength="500">

                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/bug_report_edit_text"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:minHeight="40dp"
                        android:textColor="?riotx_text_primary" />

                </com.google.android.material.textfield.TextInputLayout>

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dp"
                    android:layout_marginEnd="10dp"
                    android:text="@string/send_bug_report_description_in_english"
                    android:textColor="?riotx_text_secondary"
                    android:textSize="12sp" />

                <TextView
                    android:id="@+id/bug_report_logs_description"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dp"
                    android:layout_marginTop="10dp"
                    android:layout_marginEnd="10dp"
                    android:text="@string/send_bug_report_logs_description"
                    android:textColor="?riotx_text_primary" />

                <com.google.android.material.switchmaterial.SwitchMaterial
                    android:id="@+id/bug_report_button_include_logs"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dp"
                    android:layout_marginEnd="10dp"
                    android:checked="true"
                    android:text="@string/send_bug_report_include_logs" />

                <com.google.android.material.switchmaterial.SwitchMaterial
                    android:id="@+id/bug_report_button_include_crash_logs"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dp"
                    android:layout_marginEnd="10dp"
                    android:checked="true"
                    android:text="@string/send_bug_report_include_crash_logs" />

                <com.google.android.material.switchmaterial.SwitchMaterial
                    android:id="@+id/bug_report_button_include_key_share_history"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dp"
                    android:layout_marginEnd="10dp"
                    android:checked="false"
                    android:text="@string/send_bug_report_include_key_share_history" />

                <com.google.android.material.switchmaterial.SwitchMaterial
                    android:id="@+id/bug_report_button_include_screenshot"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dp"
                    android:layout_marginEnd="10dp"
                    android:checked="true"
                    android:text="@string/send_bug_report_include_screenshot" />

                <ImageView
                    android:id="@+id/bug_report_screenshot_preview"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:layout_marginTop="10dp"
                    android:adjustViewBounds="true"
                    android:maxWidth="260dp"
                    android:scaleType="fitCenter"
                    tools:src="@tools:sample/backgrounds/scenic" />

            </LinearLayout>
        </ScrollView>
    </LinearLayout>

    <View
        android:id="@+id/bug_report_mask_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/transparent"
        android:clickable="true"
        android:focusable="true"
        android:visibility="gone" />
</LinearLayout>