<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- focusable and related properties to workaround http://stackoverflow.com/q/16182331-->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:descendantFocusability="beforeDescendants"
        android:orientation="vertical"
        android:paddingLeft="16dp"
        android:paddingRight="16dp">

        <TextView
            style="@style/SectionHeader"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/section_fingerprint"
            android:layout_weight="1" />

        <LinearLayout
            android:id="@+id/view_key_action_fingerprint_share"
            android:layout_width="match_parent"
            android:layout_height="?android:attr/listPreferredItemHeight"
            android:clickable="true"
            android:background="?android:selectableItemBackground"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/view_key_fingerprint"
                android:paddingLeft="8dp"
                android:paddingRight="8dp"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:layout_width="0dip"
                android:layout_height="match_parent"
                android:text=""
                android:layout_weight="1"
                android:typeface="monospace"
                android:drawableRight="@drawable/ic_share_grey_24dp"
                android:drawablePadding="8dp"
                android:gravity="center_vertical" />

            <View
                android:layout_width="1dip"
                android:layout_height="match_parent"
                android:gravity="right"
                android:layout_marginBottom="8dp"
                android:layout_marginTop="8dp"
                android:background="?android:attr/listDivider" />

            <ImageButton
                android:id="@+id/view_key_action_fingerprint_clipboard"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:padding="8dp"
                android:src="@drawable/ic_content_copy_grey_24dp"
                android:layout_gravity="center_vertical"
                android:background="?android:selectableItemBackground" />

        </LinearLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="1dip"
            android:background="?android:attr/listDivider" />

        <android.support.v7.widget.CardView
            android:id="@+id/view_key_qr_code_layout"
            android:transitionName="qr_code"
            android:visibility="visible"
            android:layout_marginTop="16dp"
            android:layout_width="200dp"
            android:layout_height="200dp"
            android:layout_gravity="center_horizontal"
            android:layout_weight="1"
            android:clickable="true"
            android:foreground="?android:attr/selectableItemBackground"
            card_view:cardBackgroundColor="@android:color/white"
            card_view:cardUseCompatPadding="true"
            card_view:cardElevation="2dp"
            card_view:cardCornerRadius="4dp">

            <ImageView
                android:id="@+id/view_key_qr_code"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </android.support.v7.widget.CardView>

        <TextView
            style="@style/SectionHeader"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:text="@string/section_share_key"
            android:layout_weight="1" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="?android:attr/listPreferredItemHeight"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/view_key_action_key_share"
                android:paddingLeft="8dp"
                android:paddingRight="8dp"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:layout_width="0dip"
                android:layout_height="match_parent"
                android:text="@string/key_view_action_share_with"
                android:layout_weight="1"
                android:drawableRight="@drawable/ic_share_grey_24dp"
                android:drawablePadding="8dp"
                android:gravity="center_vertical"
                android:background="?android:selectableItemBackground"/>

            <View
                android:layout_width="1dip"
                android:layout_height="match_parent"
                android:gravity="right"
                android:layout_marginBottom="8dp"
                android:layout_marginTop="8dp"
                android:background="?android:attr/listDivider" />

            <ImageButton
                android:id="@+id/view_key_action_key_nfc"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:padding="8dp"
                android:src="@drawable/ic_nfc_grey_24dp"
                android:layout_gravity="center_vertical"
                android:background="?android:selectableItemBackground" />

            <View
                android:layout_width="1dip"
                android:layout_height="match_parent"
                android:gravity="right"
                android:layout_marginBottom="8dp"
                android:layout_marginTop="8dp"
                android:background="?android:attr/listDivider" />

            <ImageButton
                android:id="@+id/view_key_action_key_clipboard"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:padding="8dp"
                android:src="@drawable/ic_content_copy_grey_24dp"
                android:layout_gravity="center_vertical"
                android:background="?android:selectableItemBackground" />

            <View
                android:layout_width="1dip"
                android:layout_height="match_parent"
                android:gravity="right"
                android:layout_marginBottom="8dp"
                android:layout_marginTop="8dp"
                android:background="?android:attr/listDivider" />

            <ImageButton
                android:id="@+id/view_key_action_key_safeslinger"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:padding="8dp"
                android:src="@drawable/ic_repeat_grey_24dp"
                android:layout_gravity="center_vertical"
                android:background="?android:selectableItemBackground" />

        </LinearLayout>


        <View
            android:layout_width="match_parent"
            android:layout_height="1dip"
            android:background="?android:attr/listDivider" />

        <TextView
            android:id="@+id/view_key_action_upload"
            android:paddingLeft="8dp"
            android:paddingRight="8dp"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:minHeight="?android:attr/listPreferredItemHeight"
            android:clickable="true"
            android:background="?android:selectableItemBackground"
            android:text="@string/key_view_action_upload"
            android:layout_weight="1"
            android:drawableRight="@drawable/ic_file_upload_grey_24dp"
            android:drawablePadding="8dp"
            android:gravity="center_vertical" />

    </LinearLayout>

</ScrollView>
