<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:custom="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator
        android:id="@+id/view_animator"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:animateLayoutChanges="true"
        android:inAnimation="@anim/fade_in"
        android:measureAllChildren="false"
        android:minHeight="?listPreferredItemHeightSmall"
        android:outAnimation="@anim/fade_out"
        custom:initialView="3">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/nfc_activity_0_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="24dp"
                android:layout_marginRight="24dp"
                android:layout_marginTop="24dp"
                android:text="@string/nfc_text"
                android:textAppearance="@android:style/TextAppearance.Medium" />

            <ImageView
                android:id="@+id/nfc_activity_0_image"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"
                android:layout_below="@+id/nfc_activity_0_text"
                android:layout_margin="24dp"
                android:adjustViewBounds="true"
                android:background="@android:color/transparent"
                android:src="@drawable/yubikey_phone" />
        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/nfc_activity_1_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="24dp"
                android:layout_marginRight="24dp"
                android:layout_marginTop="24dp"
                android:text="@string/nfc_wait"
                android:textAppearance="@android:style/TextAppearance.Medium" />

            <ProgressBar
                style="?android:attr/progressBarStyleLarge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                android:padding="8dp" />

            <!-- placeholder to retain dialog size -->
            <ImageView
                android:id="@+id/nfc_activity_1_placeholder"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"
                android:layout_below="@+id/nfc_activity_1_text"
                android:layout_margin="24dp"
                android:adjustViewBounds="true"
                android:background="@android:color/transparent"
                android:src="@drawable/yubikey_phone"
                android:visibility="invisible" />

        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/nfc_activity_2_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="24dp"
                android:layout_marginRight="24dp"
                android:layout_marginTop="24dp"
                android:text="@string/nfc_finished"
                android:textAppearance="@android:style/TextAppearance.Medium" />

            <!-- placeholder to retain dialog size -->
            <ImageView
                android:id="@+id/nfc_activity_2_placeholder"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"
                android:layout_below="@+id/nfc_activity_2_text"
                android:layout_margin="24dp"
                android:adjustViewBounds="true"
                android:background="@android:color/transparent"
                android:src="@drawable/yubikey_phone"
                android:visibility="invisible" />

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                android:adjustViewBounds="true"
                android:background="@android:color/transparent"
                android:src="@drawable/ic_check_circle_black_48dp" />

        </RelativeLayout>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/nfc_activity_3_text_placeholder"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignEnd="@+id/nfc_activity_3_placeholder"
                android:layout_alignRight="@+id/nfc_activity_3_placeholder"
                android:layout_marginLeft="24dp"
                android:layout_marginTop="24dp"
                android:text=""
                android:textAppearance="@android:style/TextAppearance.Medium" />

            <!-- placeholder to retain dialog size -->
            <ImageView
                android:id="@+id/nfc_activity_3_placeholder"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"
                android:layout_below="@+id/nfc_activity_3_text_placeholder"
                android:layout_margin="24dp"
                android:adjustViewBounds="true"
                android:background="@android:color/transparent"
                android:src="@drawable/yubikey_phone"
                android:visibility="invisible" />

            <TextView
                android:id="@+id/nfc_activity_3_error_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerHorizontal="true"
                android:layout_centerVertical="true"
                android:layout_margin="24dp"
                android:textAppearance="@android:style/TextAppearance.Medium"
                android:textColor="@color/android_red_dark"
                tools:text="Error text" />

            <Button
                android:id="@+id/nfc_activity_3_error_try_again"
                style="?android:attr/borderlessButtonStyle"
                android:layout_width="wrap_content"
                android:layout_height="48dp"
                android:layout_alignParentEnd="true"
                android:layout_alignParentRight="true"
                android:layout_below="@+id/nfc_activity_3_placeholder"
                android:layout_margin="8dp"
                android:text="@string/error_nfc_try_again"
                android:textColor="@color/accent" />

        </RelativeLayout>

    </org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator>

</LinearLayout>