<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    android:orientation="vertical"
    tools:context="com.nutomic.syncthingandroid.activities.ShareActivity">

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

        <include layout="@layout/widget_toolbar" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:paddingBottom="8dp"
            android:paddingLeft="@dimen/abc_action_bar_content_inset_material"
            android:paddingRight="@dimen/abc_action_bar_content_inset_material"
            android:paddingTop="8dp">

            <TextView
                android:id="@+id/namesTitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <EditText
                android:id="@+id/name"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:layout_marginEnd="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:ems="10"
                android:hint="@string/folder_label"
                android:inputType="text|textMultiLine"
                android:importantForAutofill="no"
                app:layout_constraintBottom_toTopOf="@+id/folders"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/namesTitle"
                app:layout_constraintVertical_bias="0.0" />

            <TextView
                android:id="@+id/folder_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginTop="7dp"
                android:text="@string/folder_title"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/name" />

            <Spinner
                android:id="@+id/folders"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/folder_title" />

            <Button
                android:id="@+id/share_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:layout_marginEnd="8dp"
                android:layout_marginTop="8dp"
                android:background="?attr/selectableItemBackground"
                android:minWidth="60dip"
                android:text="@string/save_title"
                android:textColor="@color/accent"
                android:textSize="14sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/browse_button"
                app:layout_constraintVertical_bias="0.965" />

            <Button
                android:id="@+id/cancel_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:layout_marginEnd="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:background="?attr/selectableItemBackground"
                android:minWidth="50dip"
                android:text="@string/cancel_title"
                android:textColor="@color/accent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintHorizontal_bias="0.951"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@+id/share_button"
                app:layout_constraintTop_toBottomOf="@+id/sub_directory_Textview"
                app:layout_constraintVertical_bias="0.964" />

            <TextView
                android:id="@+id/sub_folder_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:text="@string/sub_folder"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/folders" />

            <TextView
                android:id="@+id/sub_directory_Textview"
                style="@style/Widget.Syncthing.TextView.Label.Details"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="8dp"
                android:layout_marginTop="6dp"
                app:drawableLeftCompat="@drawable/baseline_folder_24"
                app:drawableStartCompat="@drawable/baseline_folder_24"
                android:focusable="true"
                android:hint="@string/no_sub_folder_is_selected"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@+id/browse_button"
                app:layout_constraintTop_toBottomOf="@+id/sub_folder_title" />

            <Button
                android:id="@+id/browse_button"
                android:layout_width="88dp"
                android:layout_height="48dp"
                android:layout_marginEnd="8dp"
                android:text="@string/browse"
                app:layout_constraintBottom_toBottomOf="@+id/sub_directory_Textview"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="@+id/sub_directory_Textview" />

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