activity_login.xml 5.83 KB
Newer Older
1 2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
Christophe Henry's avatar
Christophe Henry committed
3
    xmlns:tools="http://schemas.android.com/tools"
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".activities.LoginActivity">

    <ScrollView
        android:id="@+id/login_form"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
    >
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_gravity="center"
            android:visibility="visible"
        >

27
            <LinearLayout
28
                android:layout_width="match_parent"
29 30 31 32 33 34 35 36 37 38 39 40
                android:layout_height="wrap_content"
                android:orientation="horizontal"
            >
                <Spinner
                    android:id="@+id/activity_login_protocol_selection"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:entries="@array/connection_options"
                    android:dropDownWidth="wrap_content"
                    android:spinnerMode="dropdown" />
                <com.google.android.material.textfield.TextInputLayout
                    android:layout_width="0dp"
41
                    android:layout_height="wrap_content"
Christophe Henry's avatar
Christophe Henry committed
42
                    android:layout_weight="100">
43 44 45 46 47 48 49 50
                    <EditText
                        android:id="@+id/instance"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/prompt_instance"
                        android:maxLines="1"
                        android:singleLine="true"
                        android:inputType="textUri"
Christophe Henry's avatar
Christophe Henry committed
51 52 53
                        android:autoLink="web|none"
                        android:autofillHints="url"
                        tools:ignore="UnusedAttribute" />
54 55
                </com.google.android.material.textfield.TextInputLayout>
            </LinearLayout>
56

Christophe Henry's avatar
Christophe Henry committed
57 58
            <TextView
                android:id="@+id/reified_instance_url"
59
                android:layout_width="match_parent"
60
                android:layout_height="wrap_content"
61 62
                android:paddingLeft="6dp"
                android:paddingRight="6dp"
63 64
                android:paddingTop="@dimen/subscription_section_h_padding"
                android:paddingBottom="@dimen/subscription_section_h_padding"
Christophe Henry's avatar
Christophe Henry committed
65 66
                android:text="@string/instance_exemple"
            />
67 68 69 70 71 72 73 74 75 76 77 78

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <EditText
                    android:id="@+id/login"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/prompt_login"
                    android:maxLines="1"
                    android:singleLine="true"
Christophe Henry's avatar
Christophe Henry committed
79 80 81
                    android:inputType="text"
                    android:autofillHints="username"
                    tools:ignore="UnusedAttribute" />
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97

            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <EditText
                    android:id="@+id/password"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/prompt_password"
                    android:imeActionId="6"
                    android:imeActionLabel="@string/action_sign_in"
                    android:imeOptions="actionUnspecified"
                    android:inputType="textPassword"
                    android:maxLines="1"
Christophe Henry's avatar
Christophe Henry committed
98 99 100
                    android:singleLine="true"
                    android:autofillHints="password"
                    tools:ignore="UnusedAttribute" />
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141

            </com.google.android.material.textfield.TextInputLayout>

            <Button
                android:id="@+id/email_sign_in_button"
                style="?android:textAppearanceSmall"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:text="@string/action_sign_in"
                android:textStyle="bold" />
        </LinearLayout>
    </ScrollView>

    <LinearLayout
        android:id="@+id/login_progress"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingLeft="6dp"
        android:paddingRight="6dp"
        android:gravity="center"
        android:visibility="gone">

        <TextView
            android:id="@+id/login_progress_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textSize="16sp"
            android:textStyle="bold"
            android:layout_marginBottom="@dimen/activity_vertical_margin"
        />
        <ProgressBar
            style="?android:attr/progressBarStyleLarge"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp" />

    </LinearLayout>
</LinearLayout>