<?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:id="@+id/unlock_container"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:filterTouchesWhenObscured="true"
    android:paddingTop="6dp"
    android:paddingLeft="12dp"
    android:paddingStart="12dp"
    android:paddingRight="12dp"
    android:paddingEnd="12dp"
    android:paddingBottom="12dp"
    tools:targetApi="lollipop">

    <!-- Password Input -->
    <RelativeLayout
        android:id="@+id/password_input_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/password_input_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toStartOf="@+id/password_checkbox"
            android:layout_toLeftOf="@+id/password_checkbox"
            app:endIconMode="password_toggle">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/password_text_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="48dp"
                android:hint="@string/password"
                android:inputType="textPassword"
                android:textDirection="ltr"
                android:importantForAutofill="no"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:autofillHints="password"
                android:imeOptions="actionDone|flagNoPersonalizedLearning"
                android:maxLines="1"/>
        </com.google.android.material.textfield.TextInputLayout>

        <com.google.android.material.materialswitch.MaterialSwitch
            android:id="@+id/password_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/password_input_layout"
            android:layout_alignBottom="@+id/password_input_layout"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_marginTop="4dp"
            android:layout_marginStart="12dp"
            android:layout_marginLeft="12dp"
            android:contentDescription="@string/content_description_password_checkbox"
            android:gravity="center_vertical" />
    </RelativeLayout>

    <!-- File Input -->
    <RelativeLayout
        android:id="@+id/container_key_file"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.kunzisoft.keepass.view.KeyFileSelectionView
            android:id="@+id/keyfile_selection"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toStartOf="@+id/keyfile_checkbox"
            android:layout_toLeftOf="@+id/keyfile_checkbox"
            android:importantForAccessibility="no"
            android:importantForAutofill="no"
            android:minHeight="48dp" />

        <com.google.android.material.materialswitch.MaterialSwitch
            android:id="@+id/keyfile_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/keyfile_selection"
            android:layout_alignBottom="@+id/keyfile_selection"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_marginTop="4dp"
            android:layout_marginStart="12dp"
            android:layout_marginLeft="12dp"
            android:contentDescription="@string/content_description_keyfile_checkbox"
            android:gravity="center_vertical" />
    </RelativeLayout>

    <!-- Hardware key -->
    <RelativeLayout
        android:id="@+id/container_hardware_key"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.kunzisoft.keepass.view.HardwareKeySelectionView
            android:id="@+id/hardware_key_selection"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_toStartOf="@+id/hardware_key_checkbox"
            android:layout_toLeftOf="@+id/hardware_key_checkbox"
            android:importantForAccessibility="no"
            android:importantForAutofill="no" />

        <com.google.android.material.materialswitch.MaterialSwitch
            android:id="@+id/hardware_key_checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/hardware_key_selection"
            android:layout_alignBottom="@+id/hardware_key_selection"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_marginTop="4dp"
            android:layout_marginStart="12dp"
            android:layout_marginLeft="12dp"
            android:contentDescription="@string/content_description_hardware_key_checkbox"
            android:gravity="center_vertical" />
    </RelativeLayout>

</LinearLayout>