|
3 | 3 | xmlns:tools="http://schemas.android.com/tools"
|
4 | 4 | android:layout_width="match_parent"
|
5 | 5 | android:layout_height="match_parent"
|
| 6 | + android:gravity="center_horizontal" |
6 | 7 | android:orientation="vertical">
|
7 | 8 |
|
8 | 9 | <android.support.design.widget.AppBarLayout
|
|
18 | 19 |
|
19 | 20 | </android.support.design.widget.AppBarLayout>
|
20 | 21 |
|
| 22 | + <TextView |
| 23 | + android:id="@+id/textView1" |
| 24 | + android:layout_width="wrap_content" |
| 25 | + android:layout_height="wrap_content" |
| 26 | + android:layout_marginTop="16dp" |
| 27 | + android:gravity="center|center_horizontal" |
| 28 | + android:padding="10dp" |
| 29 | + android:text="@string/login_welcome_blurb" |
| 30 | + android:textAppearance="?android:attr/textAppearanceLarge" /> |
| 31 | + |
| 32 | + |
21 | 33 | <LinearLayout
|
| 34 | + android:id="@+id/serverInput" |
22 | 35 | android:layout_width="match_parent"
|
23 |
| - android:layout_height="match_parent" |
| 36 | + android:layout_height="wrap_content" |
24 | 37 | android:gravity="center"
|
25 | 38 | android:orientation="vertical"
|
26 | 39 | android:padding="16dp">
|
27 | 40 |
|
28 | 41 | <TextView
|
29 |
| - android:id="@+id/textView1" |
| 42 | + android:id="@+id/info_txt" |
30 | 43 | android:layout_width="wrap_content"
|
31 | 44 | android:layout_height="wrap_content"
|
32 | 45 | android:gravity="center|center_horizontal"
|
33 | 46 | android:padding="10dp"
|
34 |
| - android:text="@string/login_welcome_blurb" |
35 |
| - android:textAppearance="?android:attr/textAppearanceLarge" /> |
| 47 | + android:text="@string/enter_server" |
| 48 | + android:textAppearance="?android:attr/textAppearanceMedium" /> |
36 | 49 |
|
37 | 50 | <EditText
|
38 |
| - android:id="@+id/username" |
| 51 | + android:id="@+id/server_url_in" |
39 | 52 | android:layout_width="match_parent"
|
40 | 53 | android:layout_height="wrap_content"
|
41 | 54 | android:ems="10"
|
42 |
| - android:hint="@string/username" |
43 |
| - android:inputType="textEmailAddress" |
| 55 | + android:hint="Server URL" |
| 56 | + android:inputType="textUri" |
44 | 57 | android:selectAllOnFocus="true">
|
45 | 58 |
|
46 | 59 | <requestFocus />
|
47 | 60 | </EditText>
|
48 | 61 |
|
49 |
| - <EditText |
50 |
| - android:id="@+id/password" |
| 62 | + <Button |
| 63 | + android:id="@+id/server_btn" |
| 64 | + style="android:buttonStyle" |
51 | 65 | android:layout_width="match_parent"
|
52 | 66 | android:layout_height="wrap_content"
|
53 |
| - android:ems="10" |
54 |
| - android:hint="@string/password" |
55 |
| - android:inputType="textPassword" |
56 |
| - android:selectAllOnFocus="true" /> |
| 67 | + android:layout_marginTop="20dp" |
| 68 | + android:text="@string/enter" /> |
| 69 | + |
| 70 | + </LinearLayout> |
| 71 | + |
| 72 | + <LinearLayout |
| 73 | + android:id="@+id/serverFieldLayout" |
| 74 | + android:layout_width="match_parent" |
| 75 | + android:layout_height="wrap_content" |
| 76 | + android:gravity="center" |
| 77 | + android:orientation="vertical" |
| 78 | + android:padding="16dp" |
| 79 | + android:visibility="gone"> |
| 80 | + |
| 81 | + <TextView |
| 82 | + android:layout_width="wrap_content" |
| 83 | + android:layout_height="wrap_content" |
| 84 | + android:layout_marginTop="10dp" |
| 85 | + android:text="@string/auth_login" /> |
57 | 86 |
|
58 | 87 | <EditText
|
59 | 88 | android:id="@+id/server_url"
|
|
64 | 93 | android:inputType="textUri"
|
65 | 94 | android:selectAllOnFocus="true" />
|
66 | 95 |
|
67 |
| - <Button |
68 |
| - android:id="@+id/zulip_login" |
69 |
| - style="android:buttonStyle" |
| 96 | + <LinearLayout |
| 97 | + android:id="@+id/passwordAuthLayout" |
70 | 98 | android:layout_width="match_parent"
|
71 | 99 | android:layout_height="wrap_content"
|
72 |
| - android:layout_marginTop="20dp" |
73 |
| - android:text="@string/login_button" /> |
| 100 | + android:orientation="vertical" |
| 101 | + android:paddingBottom="8dp" |
| 102 | + android:paddingTop="8dp" |
| 103 | + android:visibility="gone"> |
| 104 | + |
| 105 | + <EditText |
| 106 | + android:id="@+id/username" |
| 107 | + android:layout_width="match_parent" |
| 108 | + android:layout_height="wrap_content" |
| 109 | + android:ems="10" |
| 110 | + android:hint="@string/username" |
| 111 | + android:inputType="textEmailAddress" |
| 112 | + android:selectAllOnFocus="true" /> |
74 | 113 |
|
| 114 | + <EditText |
| 115 | + android:id="@+id/password" |
| 116 | + android:layout_width="match_parent" |
| 117 | + android:layout_height="wrap_content" |
| 118 | + android:ems="10" |
| 119 | + android:hint="@string/password" |
| 120 | + android:inputType="textPassword" |
| 121 | + android:selectAllOnFocus="true" /> |
| 122 | + |
| 123 | + <Button |
| 124 | + android:id="@+id/zulip_login" |
| 125 | + style="android:buttonStyle" |
| 126 | + android:layout_width="match_parent" |
| 127 | + android:layout_height="wrap_content" |
| 128 | + android:text="@string/login_button" /> |
| 129 | + |
| 130 | + |
| 131 | + </LinearLayout> |
75 | 132 |
|
76 | 133 | <com.google.android.gms.common.SignInButton
|
77 | 134 | android:id="@+id/google_sign_in_button"
|
78 | 135 | android:layout_width="match_parent"
|
79 | 136 | android:layout_height="wrap_content"
|
80 |
| - android:layout_marginTop="28dp" /> |
| 137 | + android:visibility="gone" /> |
81 | 138 |
|
82 | 139 | <TextView
|
83 | 140 | android:id="@+id/local_server_button"
|
|
86 | 143 | android:onClick="onClick"
|
87 | 144 | android:paddingTop="16dp"
|
88 | 145 | android:text="@string/local_server"
|
89 |
| - android:textColor="#ff0099cc" /> |
| 146 | + android:textColor="#ff0099cc" |
| 147 | + android:visibility="gone" /> |
90 | 148 |
|
91 | 149 | <TextView
|
92 |
| - android:id="@+id/legal_button" |
| 150 | + android:id="@+id/input_another_server" |
93 | 151 | android:layout_width="wrap_content"
|
94 | 152 | android:layout_height="wrap_content"
|
95 |
| - android:paddingTop="8dp" |
96 |
| - android:text="@string/legal" |
| 153 | + android:onClick="onClick" |
| 154 | + android:paddingTop="16dp" |
| 155 | + android:text="@string/another_server" |
97 | 156 | android:textColor="#ff0099cc" />
|
98 | 157 | </LinearLayout>
|
| 158 | + |
| 159 | + <TextView |
| 160 | + android:id="@+id/legal_button" |
| 161 | + android:layout_width="wrap_content" |
| 162 | + android:layout_height="wrap_content" |
| 163 | + android:layout_marginBottom="29dp" |
| 164 | + android:paddingTop="8dp" |
| 165 | + android:text="@string/legal" |
| 166 | + android:textColor="#ff0099cc" /> |
99 | 167 | </LinearLayout>
|
0 commit comments