Merge pull request #152 from owncloud/oauth_login
[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) 2012-2013 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
21
22 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
23 android:layout_width="match_parent"
24 android:layout_height="match_parent"
25 android:orientation="vertical" >
26
27 <LinearLayout
28 android:layout_width="match_parent"
29 android:layout_height="wrap_content"
30 android:layout_gravity="center"
31 android:focusable="true"
32 android:gravity="center"
33 android:orientation="vertical" >
34
35 <FrameLayout
36 android:layout_width="match_parent"
37 android:layout_height="0dip"
38 android:layout_gravity="center"
39 android:layout_marginBottom="50dip"
40 android:layout_marginLeft="16dip"
41 android:layout_marginRight="16dip"
42 android:layout_weight="1" >
43
44 <LinearLayout
45 android:id="@+id/LinearLayout1"
46 android:layout_width="match_parent"
47 android:layout_height="wrap_content"
48 android:layout_gravity="center"
49 android:orientation="vertical" >
50
51 <ImageView
52 android:id="@+id/imageView1"
53 android:layout_width="match_parent"
54 android:layout_height="wrap_content"
55 android:layout_marginBottom="10dp"
56 android:layout_weight="1"
57 android:src="@drawable/owncloud_logo" />
58
59 <FrameLayout
60 android:layout_width="match_parent"
61 android:layout_height="wrap_content"
62 android:layout_weight="1" >
63
64 <EditText
65 android:id="@+id/hostUrlInput"
66 android:layout_width="match_parent"
67 android:layout_height="wrap_content"
68 android:ems="10"
69 android:hint="@string/auth_host_url"
70 android:inputType="textNoSuggestions" >
71 <requestFocus />
72 </EditText>
73
74 <ImageView
75 android:id="@+id/refreshButton"
76 android:layout_width="wrap_content"
77 android:layout_height="wrap_content"
78 android:src="@drawable/ic_action_refresh_black"
79 android:layout_gravity="right|center_vertical"
80 android:visibility="invisible" />
81
82 </FrameLayout>
83
84 <LinearLayout
85 android:layout_width="match_parent"
86 android:layout_height="50dp"
87 android:layout_weight="1" >
88
89 <ImageView
90 android:id="@+id/action_indicator"
91 android:layout_width="wrap_content"
92 android:layout_height="wrap_content"
93 android:layout_marginLeft="5dp"
94 android:layout_marginRight="5dp"
95 android:src="@android:drawable/stat_notify_sync"
96 android:visibility="invisible" />
97
98 <TextView
99 android:id="@+id/status_text"
100 android:layout_width="wrap_content"
101 android:layout_height="wrap_content"
102 android:text="TextView"
103 android:visibility="invisible" />
104
105 </LinearLayout>
106
107 <CheckBox
108 android:id="@+id/oauth_onOff_check"
109 android:layout_width="wrap_content"
110 android:layout_height="wrap_content"
111 android:checked="false"
112 android:onClick="onCheckClick"
113 android:text="@string/oauth_check_onoff"
114 android:textAppearance="?android:attr/textAppearanceSmall" />
115
116 <TextView
117 android:id="@+id/textView2"
118 android:layout_width="wrap_content"
119 android:layout_height="0dp"
120 android:layout_weight="1"
121 android:text="@string/auth_login_details"
122 android:textAppearance="?android:attr/textAppearanceSmall" />
123
124 <EditText
125 android:id="@+id/oAuthEntryPoint_1"
126 android:layout_width="match_parent"
127 android:layout_height="wrap_content"
128 android:layout_weight="1"
129 android:ems="10"
130 android:text="@string/oauth2_url_endpoint_auth"
131 android:singleLine="true"
132 android:visibility="gone" >
133
134 <requestFocus />
135 </EditText>
136
137 <EditText
138 android:id="@+id/oAuthEntryPoint_2"
139 android:layout_width="match_parent"
140 android:layout_height="wrap_content"
141 android:layout_weight="1"
142 android:ems="10"
143 android:text="@string/oauth2_url_endpoint_access"
144 android:singleLine="true"
145 android:visibility="gone" >
146
147 <requestFocus />
148 </EditText>
149
150 <EditText
151 android:id="@+id/account_username"
152 android:layout_width="match_parent"
153 android:layout_height="0dp"
154 android:layout_weight="1"
155 android:ems="10"
156 android:hint="@string/auth_username"
157 android:inputType="textNoSuggestions" />
158
159 <FrameLayout
160 android:layout_width="match_parent"
161 android:layout_height="wrap_content"
162 android:layout_weight="1" >
163
164 <EditText
165 android:id="@+id/account_password"
166 android:layout_width="match_parent"
167 android:layout_height="wrap_content"
168 android:ems="10"
169 android:hint="@string/auth_password"
170 android:inputType="textPassword"/>
171
172 <ImageView
173 android:id="@+id/viewPasswordButton"
174 android:layout_width="wrap_content"
175 android:layout_height="wrap_content"
176 android:layout_gravity="right|center_vertical"
177 android:src="@android:drawable/ic_menu_view"
178 android:onClick="onViewPasswordClick"
179 android:visibility="invisible" />
180
181 </FrameLayout>
182
183 <TextView
184 android:id="@+id/auth_status_text"
185 android:layout_width="match_parent"
186 android:layout_height="wrap_content"
187 android:layout_weight="1"
188 android:text="@string/text_placeholder"
189 android:layout_marginLeft="5dp"
190 android:layout_marginRight="5dp"
191 android:drawableLeft="@android:drawable/stat_notify_sync"
192 android:drawablePadding="5dip"
193 android:visibility="invisible"
194 />
195
196 </LinearLayout>
197
198 </FrameLayout>
199
200 <RelativeLayout
201 android:layout_width="match_parent"
202 android:layout_height="wrap_content">
203
204 <LinearLayout
205 android:id="@+id/buttons_layout"
206 android:layout_width="match_parent"
207 android:layout_height="wrap_content"
208 android:weightSum="1">
209
210 <Button
211 android:id="@+id/buttonOK"
212 android:layout_width="match_parent"
213 android:layout_height="wrap_content"
214 android:layout_gravity="center_horizontal"
215 android:layout_marginLeft="16dip"
216 android:layout_marginRight="16dip"
217 android:enabled="false"
218 android:onClick="onOkClick"
219 android:text="@string/setup_btn_connect"
220 android:textColor="@android:color/black" />
221
222 </LinearLayout>
223
224 <Button
225 android:id="@+id/account_register"
226 android:layout_width="wrap_content"
227 android:layout_height="wrap_content"
228 android:layout_below="@id/buttons_layout"
229 android:layout_centerHorizontal="true"
230 android:onClick="onRegisterClick"
231 android:paddingTop="10dp"
232 android:paddingBottom="10dp"
233 android:textColor="#0000FF"
234 android:background="@android:color/transparent" />
235
236 <Button
237 android:id="@+id/account_register"
238 android:layout_width="wrap_content"
239 android:layout_height="wrap_content"
240 android:layout_below="@id/buttons_layout"
241 android:layout_centerHorizontal="true"
242 android:onClick="onRegisterClick"
243 android:paddingTop="10dp"
244 android:paddingBottom="10dp"
245 android:textColor="#0000FF"
246 android:background="@android:color/transparent" />
247 <!-- android:text="@string/app_name @string/auth_register" /-->
248
249 </RelativeLayout>
250
251 </LinearLayout>
252
253 </ScrollView>