Make the OAuth authorization available or not depending upon a variable in oauth.xml
[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 as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 -->
21 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
22 android:layout_width="fill_parent"
23 android:layout_height="fill_parent"
24 android:focusable="true"
25 android:gravity="center|fill"
26 android:orientation="vertical" >
27
28 <FrameLayout
29 android:layout_width="match_parent"
30 android:layout_height="wrap_content"
31 android:layout_gravity="center"
32 android:layout_marginLeft="16dip"
33 android:layout_marginRight="16dip"
34 android:layout_weight="1" >
35
36 <LinearLayout
37 android:id="@+id/LinearLayout1"
38 android:layout_width="match_parent"
39 android:layout_height="wrap_content"
40 android:layout_gravity="center"
41 android:orientation="vertical" >
42
43 <ImageView
44 android:id="@+id/imageView1"
45 android:layout_width="match_parent"
46 android:layout_height="wrap_content"
47 android:layout_marginBottom="10dp"
48 android:layout_weight="1"
49 android:src="@drawable/owncloud_logo" />
50
51 <FrameLayout
52 android:layout_width="match_parent"
53 android:layout_height="wrap_content"
54 android:layout_weight="1" >
55
56 <EditText
57 android:id="@+id/hostUrlInput"
58 android:layout_width="match_parent"
59 android:layout_height="wrap_content"
60 android:ems="10"
61 android:hint="@string/auth_host_url"
62 android:inputType="textNoSuggestions" >
63 <requestFocus />
64 </EditText>
65
66 <ImageView
67 android:id="@+id/refreshButton"
68 android:layout_width="wrap_content"
69 android:layout_height="wrap_content"
70 android:src="@drawable/ic_action_refresh_black"
71 android:onClick="onRefreshClick"
72 android:layout_gravity="right|center_vertical"
73 android:visibility="invisible" />
74
75 </FrameLayout>
76
77 <LinearLayout
78 android:layout_width="match_parent"
79 android:layout_height="50dp"
80 android:layout_weight="1" >
81
82 <ImageView
83 android:id="@+id/action_indicator"
84 android:layout_width="wrap_content"
85 android:layout_height="wrap_content"
86 android:layout_marginLeft="5dp"
87 android:layout_marginRight="5dp"
88 android:src="@android:drawable/stat_notify_sync"
89 android:visibility="invisible" />
90
91 <TextView
92 android:id="@+id/status_text"
93 android:layout_width="wrap_content"
94 android:layout_height="wrap_content"
95 android:text="TextView"
96 android:visibility="invisible" />
97 </LinearLayout>
98
99 <CheckBox
100 android:id="@+id/oauth_onOff_check"
101 android:layout_width="wrap_content"
102 android:layout_height="wrap_content"
103 android:checked="false"
104 android:onClick="onCheckClick"
105 android:text="@string/oauth_check_onoff"
106 android:textAppearance="?android:attr/textAppearanceSmall" />
107
108 <TextView
109 android:id="@+id/textView2"
110 android:layout_width="wrap_content"
111 android:layout_height="0dp"
112 android:layout_weight="1"
113 android:text="@string/auth_login_details"
114 android:textAppearance="?android:attr/textAppearanceSmall" />
115
116 <EditText
117 android:id="@+id/oAuthEntryPoint_1"
118 android:layout_width="match_parent"
119 android:layout_height="wrap_content"
120 android:layout_weight="1"
121 android:ems="10"
122 android:text="@string/oauth2_url_endpoint_auth"
123 android:singleLine="true"
124 android:visibility="gone" >
125
126 <requestFocus />
127 </EditText>
128
129 <EditText
130 android:id="@+id/oAuthEntryPoint_2"
131 android:layout_width="match_parent"
132 android:layout_height="wrap_content"
133 android:layout_weight="1"
134 android:ems="10"
135 android:text="@string/oauth2_url_endpoint_access"
136 android:singleLine="true"
137 android:visibility="gone" >
138
139 <requestFocus />
140 </EditText>
141
142 <EditText
143 android:id="@+id/account_username"
144 android:layout_width="match_parent"
145 android:layout_height="0dp"
146 android:layout_weight="1"
147 android:ems="10"
148 android:hint="@string/auth_username"
149 android:inputType="textNoSuggestions" />
150
151 <FrameLayout
152 android:layout_width="match_parent"
153 android:layout_height="wrap_content"
154 android:layout_weight="1" >
155
156 <EditText
157 android:id="@+id/account_password"
158 android:layout_width="match_parent"
159 android:layout_height="wrap_content"
160 android:ems="10"
161 android:hint="@string/auth_password"
162 android:inputType="textPassword"/>
163
164 <ImageView
165 android:id="@+id/viewPasswordButton"
166 android:layout_width="wrap_content"
167 android:layout_height="wrap_content"
168 android:layout_gravity="right|center_vertical"
169 android:src="@android:drawable/ic_menu_view"
170 android:onClick="onViewPasswordClick"
171 android:visibility="invisible" />
172
173 </FrameLayout>
174
175 <!-- LinearLayout
176 android:id="@+id/auth_status_layout"
177 android:layout_width="match_parent"
178 android:layout_height="wrap_content"
179 android:layout_weight="1"
180 android:visibility="invisible"
181 >
182
183 <ImageView
184 android:id="@+id/auth_status_icon"
185 android:layout_width="wrap_content"
186 android:layout_height="wrap_content"
187 android:layout_marginLeft="5dp"
188 android:layout_marginRight="5dp"
189 android:src="@android:drawable/stat_notify_sync"
190 />
191
192 <TextView
193 android:id="@+id/auth_status_text"
194 android:layout_width="wrap_content"
195 android:layout_height="wrap_content"
196 android:text="@string/text_placeholder"
197 >
198
199 </LinearLayout -->
200
201 <TextView
202 android:id="@+id/auth_status_text"
203 android:layout_width="match_parent"
204 android:layout_height="wrap_content"
205 android:layout_weight="1"
206 android:text="@string/text_placeholder"
207 android:layout_marginLeft="5dp"
208 android:layout_marginRight="5dp"
209 android:drawableLeft="@android:drawable/stat_notify_sync"
210 android:drawablePadding="5dip"
211 android:visibility="invisible"
212 />
213
214 </LinearLayout>
215
216 </FrameLayout>
217
218 <RelativeLayout
219 android:layout_width="match_parent"
220 android:layout_height="wrap_content">
221
222 <LinearLayout
223 android:id="@+id/buttons_layout"
224 android:layout_width="match_parent"
225 android:layout_height="wrap_content"
226 android:weightSum="1" >
227
228 <Button
229 android:id="@+id/buttonCancel"
230 android:layout_width="match_parent"
231 android:layout_height="wrap_content"
232 android:layout_weight=".5"
233 android:onClick="onCancelClick"
234 android:text="@string/common_cancel" />
235
236 <Button
237 android:id="@+id/buttonOK"
238 android:layout_width="match_parent"
239 android:layout_height="wrap_content"
240 android:layout_weight=".5"
241 android:enabled="false"
242 android:onClick="onOkClick"
243 android:text="@string/setup_btn_connect"
244 android:textColor="@android:color/black" />
245
246 </LinearLayout>
247
248 <Button
249 android:id="@+id/account_register"
250 android:layout_width="wrap_content"
251 android:layout_height="wrap_content"
252 android:layout_below="@id/buttons_layout"
253 android:layout_centerHorizontal="true"
254 android:onClick="onRegisterClick"
255 android:paddingTop="10dp"
256 android:paddingBottom="10dp"
257 android:textColor="#0000FF"
258 android:background="@android:color/transparent" />
259 <!-- android:text="@string/app_name @string/auth_register" /-->
260
261 </RelativeLayout>
262
263 </LinearLayout>