<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>
        <import type="android.view.View" alias="V" />
        <import type="org.sufficientlysecure.keychain.keyimport.ImportKeysListEntry" />

        <variable name="nonInteractive" type="boolean" />
        <variable name="entry" type="ImportKeysListEntry" />
    </data>

    <android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
        android:id="@+id/card"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:layout_marginTop="4dp"
        card_view:cardCornerRadius="2dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

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

                <LinearLayout
                    android:id="@+id/container"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentLeft="true"
                    android:orientation="vertical"
                    android:paddingBottom="16dp"
                    android:paddingLeft="16dp"
                    android:paddingRight="16dp"
                    android:paddingTop="16dp">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textAppearance="?android:attr/textAppearanceMedium"
                        app:keyRevokedOrExpiredOrInsecure="@{entry.revokedOrExpiredOrInsecure}"
                        app:keySecret="@{entry.secretKey}"
                        app:keyUserId="@{entry.primaryUserId.name}"
                        app:query="@{entry.query}" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="4dp"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        app:keyRevokedOrExpiredOrInsecure="@{entry.revokedOrExpiredOrInsecure}"
                        app:keyUserEmail="@{entry.primaryUserId.email}"
                        app:query="@{entry.query}" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        app:keyCreation="@{entry.date}"
                        app:keyRevokedOrExpiredOrInsecure="@{entry.revokedOrExpiredOrInsecure}" />

                </LinearLayout>

                <FrameLayout
                    android:id="@+id/extra_container"
                    android:layout_below="@id/container"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:animateLayoutChanges="true"
                    android:orientation="vertical"
                    android:visibility="gone">

                    <include
                        android:id="@+id/extra"
                        layout="@layout/import_keys_list_item_extra"
                        app:entry="@{entry}" />

                </FrameLayout>

                <ProgressBar
                    android:id="@+id/progress"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="8dp"
                    android:layout_alignParentBottom="true"
                    android:layout_alignParentRight="true"
                    android:layout_alignParentEnd="true" />

            </RelativeLayout>

        </LinearLayout>

    </android.support.v7.widget.CardView>

</layout>