<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?android:attr/windowBackground"
    android:fillViewport="true">

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

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/kbs_pin_toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintEnd_toStartOf="parent" />

        <TextView
            android:id="@+id/edit_kbs_pin_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:textAppearance="@style/TextAppearance.Signal.Title1"
            app:layout_constraintBottom_toTopOf="@id/edit_kbs_pin_keyboard_toggle"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.20"
            tools:text="@string/CreateKbsPinFragment__create_your_pin" />

        <org.thoughtcrime.securesms.util.views.LearnMoreTextView
            android:id="@+id/edit_kbs_pin_description"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="27dp"
            android:layout_marginTop="12dp"
            android:layout_marginEnd="27dp"
            android:gravity="center_horizontal"
            android:minHeight="66dp"
            android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
            android:textColor="@color/signal_text_secondary"
            app:layout_constraintTop_toBottomOf="@id/edit_kbs_pin_title"
            tools:text="@string/CreateKbsPinFragment__pins_keep_information_stored_with_signal_encrypted" />

        <EditText
            android:id="@+id/edit_kbs_pin_input"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="12dp"
            android:gravity="center_horizontal"
            android:inputType="numberPassword"
            android:minWidth="210dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/edit_kbs_pin_description" />

        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/edit_kbs_pin_lottie_progress"
            android:layout_width="57dp"
            android:layout_height="57dp"
            android:layout_gravity="center_horizontal"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/edit_kbs_pin_description" />

        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/edit_kbs_pin_lottie_end"
            android:layout_width="57dp"
            android:layout_height="57dp"
            android:layout_gravity="center_horizontal"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/edit_kbs_pin_description" />

        <TextView
            android:id="@+id/edit_kbs_pin_input_label"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:gravity="center_horizontal"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/edit_kbs_pin_input"
            app:layout_goneMarginTop="65dp"
            tools:text="PIN must be at least 4 digits" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/edit_kbs_pin_keyboard_toggle"
            style="@style/Signal.Widget.Button.Large.Secondary"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="32dp"
            android:layout_marginEnd="32dp"
            app:layout_constraintTop_toBottomOf="@id/edit_kbs_pin_input_label"
            app:layout_constraintBottom_toTopOf="@id/edit_kbs_pin_confirm"
            app:layout_constraintVertical_bias="1.0"
            tools:text="Create Alphanumeric Pin" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/edit_kbs_pin_confirm"
            style="@style/Signal.Widget.Button.Large.Primary"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="32dp"
            android:layout_marginEnd="32dp"
            android:layout_marginBottom="16dp"
            android:text="@string/BaseKbsPinFragment__next"
            app:layout_constraintBottom_toBottomOf="parent" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>