wip
[pub/Android/ownCloud.git] / res / layout / account_setup.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 ownCloud Android client application
4
5 Copyright (C) 2012 Bartek Przybylski
6 Copyright (C) 2015 ownCloud Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License version 2,
10 as published by the Free Software Foundation.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 -->
20 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
21 android:layout_width="match_parent"
22 android:layout_height="match_parent"
23 android:layout_gravity="center"
24 android:fillViewport="true"
25 android:orientation="vertical"
26 android:id="@+id/scroll"
27 >
28
29 <LinearLayout
30 android:layout_width="match_parent"
31 android:layout_height="wrap_content"
32 android:background="@color/login_background_color"
33 android:gravity="center"
34 android:orientation="vertical"
35 android:padding="8dp" >
36
37 <ImageView
38 android:id="@+id/thumbnail"
39 android:layout_width="match_parent"
40 android:layout_height="wrap_content"
41 android:layout_marginBottom="20dp"
42 android:layout_marginTop="10dp"
43 android:src="@drawable/logo"
44 android:contentDescription="@string/app_name"/>
45
46 <android.support.v7.widget.AppCompatButton
47 android:id="@+id/centeredRefreshButton"
48 style="@style/ownCloud.Button"
49 android:layout_width="wrap_content"
50 android:layout_height="wrap_content"
51 android:layout_gravity="center_horizontal"
52 android:layout_marginBottom="10dp"
53 android:text="@string/auth_check_server"
54 android:visibility="gone"
55 android:contentDescription="@string/auth_check_server"/>
56
57 <TextView
58 android:id="@+id/instructions_message"
59 android:layout_width="wrap_content"
60 android:layout_height="wrap_content"
61 android:layout_gravity="fill_horizontal"
62 android:text="@string/auth_expired_basic_auth_toast"
63 android:visibility="gone"
64 android:layout_marginBottom="10dp"
65 android:textColor="@color/login_text_color"
66 android:textColorHint="@color/login_text_hint_color"
67 android:contentDescription="@string/auth_expired_basic_auth_toast"/>
68
69 <FrameLayout
70 android:id="@+id/hostUrlFrame"
71 android:layout_width="match_parent"
72 android:layout_height="wrap_content"
73 android:layout_marginBottom="0dp"
74 >
75 <EditText
76 android:id="@+id/hostUrlInput"
77 android:layout_width="match_parent"
78 android:layout_height="wrap_content"
79 android:layout_gravity="bottom"
80 android:hint="@string/auth_host_url"
81 android:inputType="textUri"
82 android:drawablePadding="5dp"
83 android:paddingRight="55dp"
84 android:textColor="@color/primary"
85 android:textColorHint="@color/login_text_hint_color"
86 android:contentDescription="@string/auth_host_address"
87 >
88 <requestFocus />
89 </EditText>
90 <ImageButton
91 android:id="@+id/embeddedRefreshButton"
92 android:layout_width="wrap_content"
93 android:layout_height="wrap_content"
94 android:layout_gravity="center_vertical|right"
95 android:layout_marginRight="5dp"
96 android:padding="0dp"
97 android:scaleType="fitCenter"
98 android:src="@drawable/ic_action_refresh_grey"
99 android:onClick="onRefreshClick"
100 android:visibility="gone"
101 android:background="@android:color/transparent"
102 android:contentDescription="@string/auth_refresh_button"
103 />
104 </FrameLayout>
105
106 <TextView
107 android:id="@+id/server_status_text"
108 android:layout_width="match_parent"
109 android:layout_height="wrap_content"
110 android:layout_marginBottom="10dp"
111 android:drawableLeft="@android:drawable/stat_notify_sync"
112 android:drawablePadding="5dp"
113 android:gravity="center_vertical"
114 android:textColor="@color/login_text_color"
115 android:textColorHint="@color/login_text_hint_color"
116 android:text="@string/auth_testing_connection"
117 android:contentDescription="@string/auth_testing_connection"/>
118
119 <CheckBox
120 android:id="@+id/oauth_onOff_check"
121 android:layout_width="wrap_content"
122 android:layout_height="wrap_content"
123 android:checked="false"
124 android:onClick="onCheckClick"
125 android:text="@string/oauth_check_onoff"
126 android:textAppearance="?android:attr/textAppearanceSmall"
127 android:textColor="@color/primary"
128 android:textColorHint="@color/login_text_hint_color"
129 android:contentDescription="@string/oauth_check_onoff"
130 />
131
132 <EditText
133 android:id="@+id/oAuthEntryPoint_1"
134 android:layout_width="match_parent"
135 android:layout_height="wrap_content"
136 android:ems="10"
137 android:enabled="false"
138 android:textColor="@color/primary"
139 android:textColorHint="@color/login_text_hint_color"
140 android:text="@string/oauth2_url_endpoint_auth"
141 android:singleLine="true"
142 android:inputType="textUri"
143 android:visibility="gone">
144 </EditText>
145
146 <EditText
147 android:id="@+id/oAuthEntryPoint_2"
148 android:layout_width="match_parent"
149 android:layout_height="wrap_content"
150 android:ems="10"
151 android:enabled="false"
152 android:text="@string/oauth2_url_endpoint_access"
153 android:singleLine="true"
154 android:inputType="textUri"
155 android:textColor="@color/primary"
156 android:textColorHint="@color/login_text_hint_color"
157 android:visibility="gone"/>
158
159 <EditText
160 android:id="@+id/account_username"
161 android:layout_width="match_parent"
162 android:layout_height="wrap_content"
163 android:ems="10"
164 android:hint="@string/auth_username"
165 android:inputType="textNoSuggestions"
166 android:textColor="@color/primary"
167 android:textColorHint="@color/login_text_hint_color"
168 android:contentDescription="@string/auth_username"
169 />
170
171 <EditText
172 android:id="@+id/account_password"
173 android:layout_width="match_parent"
174 android:layout_height="wrap_content"
175 android:drawablePadding="5dp"
176 android:ems="10"
177 android:hint="@string/auth_password"
178 android:inputType="textPassword"
179 android:textColor="@color/primary"
180 android:textColorHint="@color/login_text_hint_color"
181 android:contentDescription="@string/auth_password"
182 />
183
184 <TextView
185 android:id="@+id/auth_status_text"
186 android:layout_width="match_parent"
187 android:layout_height="wrap_content"
188 android:layout_marginBottom="10dp"
189 android:drawableLeft="@android:drawable/stat_notify_sync"
190 android:drawablePadding="5dp"
191 android:gravity="center_vertical"
192 android:text="@string/auth_unauthorized"
193 android:textColor="@color/login_text_color"
194 android:textColorHint="@color/login_text_hint_color"
195 android:contentDescription="@string/auth_unauthorized"/>
196
197 <android.support.v7.widget.AppCompatButton
198 android:id="@+id/buttonOK"
199 android:theme="@style/Button.Primary"
200 style="@style/Button.Primary"
201 android:layout_width="match_parent"
202 android:layout_height="wrap_content"
203 android:layout_gravity="center_horizontal"
204 android:enabled="false"
205 android:text="@string/setup_btn_connect"
206 android:contentDescription="@string/setup_btn_connect"/>
207
208 <Button
209 android:id="@+id/welcome_link"
210 android:layout_width="wrap_content"
211 android:layout_height="wrap_content"
212 android:background="@android:color/transparent"
213 android:onClick="onRegisterClick"
214 android:paddingBottom="5dp"
215 android:paddingTop="5dp"
216 android:text="@string/auth_register"
217 android:textColor="@color/login_text_color"
218 android:textColorHint="@color/login_text_hint_color"
219 android:contentDescription="@string/auth_register"/>
220
221 </LinearLayout>
222
223 </ScrollView>