<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingBottom="14dp"
    android:paddingTop="14dp">

    <LinearLayout
        android:id="@+id/input"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <TextView
            android:id="@+id/passphrase_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="24dp"
            android:text="@string/passphrase_for_backup"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="8dp">

            <!--
            The most reliable way to correctly size these I found was to put a transparent hint on them.
             Theoretically, this should be what the android:ems attribute is for - didn't work for me.
            -->
            <EditText
                android:id="@+id/backup_code_1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:hint="ABCDEF"
                android:inputType="textNoSuggestions|textCapCharacters"
                android:maxLength="6"
                android:singleLine="true"
                android:textColorHint="@android:color/transparent"
                android:textSize="14dp"
                android:textStyle="bold"
                android:typeface="monospace"
                tools:ignore="HardcodedText,SpUsage" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android:text="-"
                android:textSize="14dp"
                android:textStyle="bold"
                android:typeface="monospace"
                tools:ignore="HardcodedText,SpUsage" />

            <EditText
                android:id="@+id/backup_code_2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:hint="ABCDEF"
                android:inputType="textNoSuggestions|textCapCharacters"
                android:maxLength="6"
                android:singleLine="true"
                android:textColorHint="@android:color/transparent"
                android:textSize="14dp"
                android:textStyle="bold"
                android:typeface="monospace"
                tools:ignore="HardcodedText,SpUsage" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android:text="-"
                android:textSize="14dp"
                android:textStyle="bold"
                android:typeface="monospace"
                tools:ignore="HardcodedText,SpUsage" />

            <EditText
                android:id="@+id/backup_code_3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:hint="ABCDEF"
                android:inputType="textNoSuggestions|textCapCharacters"
                android:maxLength="6"
                android:singleLine="true"
                android:textColorHint="@android:color/transparent"
                android:textSize="14dp"
                android:textStyle="bold"
                android:typeface="monospace"
                tools:ignore="HardcodedText,SpUsage" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android:text="-"
                android:textSize="14dp"
                android:textStyle="bold"
                android:typeface="monospace"
                tools:ignore="HardcodedText,SpUsage" />

            <EditText
                android:id="@+id/backup_code_4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:hint="ABCDEF"
                android:inputType="textNoSuggestions|textCapCharacters"
                android:maxLength="6"
                android:singleLine="true"
                android:textColorHint="@android:color/transparent"
                android:textSize="14dp"
                android:textStyle="bold"
                android:typeface="monospace"
                tools:ignore="HardcodedText,SpUsage" />

        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/progress"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:orientation="horizontal"
        android:visibility="invisible">

        <ProgressBar
            style="?android:attr/progressBarStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal" />

        <TextView
            style="?android:attr/textAppearanceMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:padding="4dp"
            android:text="@string/label_unlock" />

    </LinearLayout>

</RelativeLayout>