<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minWidth="280dp"
    >
    <LinearLayout
        android:id="@+id/panel"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        >

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

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:text="@string/achievement_settings_login_title"
            android:textAppearance="@style/TextAppearance.AppCompat.Large" />

        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="4dp"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:layout_marginTop="4dp"
            android:text="@string/achievement_settings_login_help"
            />
        <EditText
            android:id="@+id/username"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:inputType="textVisiblePassword"
            android:nextFocusDown="@+id/password"
            android:imeOptions="actionNext"
            android:singleLine="true"
            android:hint="@string/achievement_settings_login_username_hint"
            />
        <EditText
            android:id="@+id/password"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:layout_marginRight="8dp"
            android:inputType="textPassword"
            android:imeOptions="actionDone"
            android:singleLine="true"
            android:hint="@string/achievement_settings_login_password_hint"
            />

            <TextView
                android:id="@+id/error"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="8dp"
                android:layout_marginTop="4dp"
                android:layout_marginRight="8dp"
                android:layout_marginBottom="4dp"
                android:visibility="visible" />
        </LinearLayout>
        <LinearLayout
            android:id="@+id/buttonPanel"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:divider="?android:attr/dividerHorizontal"
            android:dividerPadding="0dip"
            android:minHeight="48dp"
            android:orientation="vertical"
            android:showDividers="beginning"
            android:padding="5dp"
            >
            <LinearLayout
                style="?android:attr/buttonBarStyle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layoutDirection="locale"
                android:orientation="horizontal"
                tools:ignore="UselessParent"
                >
                <Space
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1" />

                <Button
                    android:id="@+id/cancel"
                    style="?android:attr/buttonBarButtonStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="end"
                    android:focusable="true"
                    android:maxLines="2"
                    android:minHeight="48dp"
                    android:text="@string/achievement_settings_login_cancel_button"
                    android:textSize="14sp" />

                <Button
                    android:id="@+id/login"
                    style="?android:attr/buttonBarButtonStyle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="end"
                    android:focusable="true"
                    android:maxLines="2"
                    android:minHeight="48dp"
                    android:text="@string/achievement_settings_login_login_button"
                    android:textSize="14sp" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>
    <ProgressBar
        android:id="@+id/progressBar"
        style="?android:attr/progressBarStyleLarge"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:indeterminateOnly="true"
        android:visibility="gone"
        />
</FrameLayout>