activity_login.xml 5.81 KB
Newer Older
1 2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto" 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"
42 43 44 45 46 47 48 49 50 51 52 53
                    android:layout_weight="100" >
                    <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"
                        android:autoLink="web|none" />
                </com.google.android.material.textfield.TextInputLayout>
            </LinearLayout>
54 55 56

            <LinearLayout
                android:layout_width="match_parent"
57
                android:layout_height="wrap_content"
58 59
                android:paddingLeft="6dp"
                android:paddingRight="6dp"
60 61 62 63
                android:paddingTop="@dimen/subscription_section_h_padding"
                android:paddingBottom="@dimen/subscription_section_h_padding"
                android:orientation="horizontal"
            >
64 65
                <TextView
                    android:id="@+id/reified_instance_url"
66 67
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 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 142 143
                    android:text="@string/instance_exemple"
                />
            </LinearLayout>

            <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"
                    android:inputType="text" />

            </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"
                    android:singleLine="true" />

            </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>