<?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:id="@+id/list_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".ui.PinShortcutActivity">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/pin_shortcut_appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@null"

        android:gravity="center"
        app:elevation="0dp"

        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">


            <TextView
                android:id="@+id/list_heading"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center"
                android:minHeight="?actionBarSize"
                android:padding="@dimen/appbar_padding"
                android:text="@string/pin_shortcut_title"
                android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
                android:textSize="30sp"
                app:layout_constraintEnd_toStartOf="@id/pin_shortcut_close"
                app:layout_constraintStart_toStartOf="parent" />

            <ImageView
                android:id="@+id/pin_shortcut_close"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="8dp"
                android:contentDescription="@string/content_description_close"
                android:gravity="center"
                android:includeFontPadding="true"
                android:paddingLeft="16sp"
                android:paddingRight="16sp"
                android:src="@drawable/baseline_close_24"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
        </androidx.constraintlayout.widget.ConstraintLayout>


    </com.google.android.material.appbar.AppBarLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/pin_shortcut_appbar">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="20dp"
            android:padding="16dp">

            <TextView
                android:id="@+id/pin_shortcut_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="50dp"
                android:drawablePadding="10dp"
                android:gravity="center_vertical"
                android:minHeight="40dp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:drawableLeft="@drawable/baseline_settings_24"
                tools:text="Shortcut name" />

            <CheckBox
                android:id="@+id/pin_shortcut_switch_visible"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:minHeight="48dp"
                android:text="@string/pin_shortcut_switch_visible"
                android:textColor="?android:textColor"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/pin_shortcut_label"
                app:layout_constraintWidth_max="@dimen/max_button_width" />

            <Button
                android:id="@+id/pin_shortcut_button_bind"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:text="@string/pin_shortcut_button_bind"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/pin_shortcut_switch_visible"
                app:layout_constraintWidth_max="@dimen/max_button_width" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </ScrollView>

    <Button
        android:id="@+id/pin_shortcut_button_ok"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:text="@android:string/ok"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintWidth_max="@dimen/max_button_width" />

</androidx.constraintlayout.widget.ConstraintLayout>