<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".android.crypto.ikey.IkeyBackupRestoreActivity">

    <TextView
        android:id="@+id/notice"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="An iKey backup has been found!"
        android:gravity="center"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />


    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="In order to restore the backup, please enter the backup code below."
        android:gravity="center"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView" >

        <EditText
            android:id="@+id/edit_backup_code"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:hint="Backup Code"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/btn_scan"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            android:layout_marginEnd="8dp"/>

        <ImageButton
            android:id="@+id/btn_scan"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:background="@android:color/transparent"
            android:padding="4dp"
            android:scaleType="centerCrop"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_qr_code_scanner_black_24dp" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:gravity="end">

        <Button
            android:id="@+id/btn_restore"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Restore"/>

        <Button
            android:id="@+id/btn_new_key"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Generate new key"/>

    </LinearLayout>

</LinearLayout>