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

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="?android:attr/listPreferredItemHeight"
        android:layout_marginBottom="4dp"
        android:layout_marginTop="4dp"
        android:gravity="center_horizontal"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/api_account_settings_icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentTop="true"
            android:layout_marginRight="6dp"
            android:src="@drawable/ic_person_grey_24dp" />

        <TextView
            android:id="@+id/api_account_settings_acc_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_toRightOf="@+id/api_account_settings_icon"
            android:gravity="center_vertical"
            android:orientation="vertical"
            android:text="Name (set in-code)"
            android:textAppearance="?android:attr/textAppearanceMedium" />
    </RelativeLayout>

    <TextView
        style="@style/SectionHeader"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/api_settings_settings" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="0dp"
        android:layout_margin="0dp">

        <TextView
            android:paddingLeft="8dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="@string/api_settings_key"
            android:paddingRight="8dp" />

        <org.sufficientlysecure.keychain.ui.widget.SignKeySpinner
            android:id="@+id/api_account_settings_key_spinner"
            android:minHeight="56dip"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical" />

    </LinearLayout>

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

    <TextView
        android:id="@+id/api_account_settings_create_key"
        android:background="?android:selectableItemBackground"
        android:paddingLeft="8dp"
        android:paddingRight="8dp"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:layout_width="match_parent"
        android:text="@string/api_settings_create_key"
        android:layout_height="?android:attr/listPreferredItemHeight"
        android:drawableRight="@drawable/ic_key_plus_grey600_24dp"
        android:drawablePadding="8dp"
        android:gravity="center_vertical"
        android:clickable="true" />

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

</LinearLayout>