refresh account when session expires
[pub/Android/ownCloud.git] / res / layout-land / 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 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
21 android:layout_width="match_parent"
22 android:layout_height="match_parent"
23 android:padding="8dip"
24 >
25
26 <LinearLayout
27 android:layout_width="match_parent"
28 android:layout_height="wrap_content"
29 android:layout_above="@id/buttonOK"
30 android:layout_alignParentTop="true"
31 android:orientation="horizontal" >
32
33 <ImageView
34 android:id="@+id/imageView1"
35 android:layout_width="0dp"
36 android:layout_height="wrap_content"
37 android:layout_weight="1"
38 android:layout_gravity="center"
39 android:src="@drawable/logo"
40 />
41
42 <ScrollView
43 android:layout_width="0dp"
44 android:layout_height="match_parent"
45 android:layout_weight="1"
46 android:fillViewport="true"
47 android:orientation="vertical" >
48
49 <LinearLayout
50 android:id="@+id/LinearLayout1"
51 android:layout_width="match_parent"
52 android:layout_height="wrap_content"
53 android:focusable="true"
54 android:gravity="center"
55 android:orientation="vertical"
56 android:padding="8dp" >
57
58 <Button
59 android:id="@+id/centeredRefreshButton"
60 android:layout_width="wrap_content"
61 android:layout_height="wrap_content"
62 android:layout_gravity="center_horizontal"
63 android:layout_marginBottom="10dp"
64 android:onClick="onRefreshClick"
65 android:text="@string/auth_check_server"
66 android:visibility="gone" />
67 <TextView
68 android:id="@+id/auth_message"
69 android:layout_width="wrap_content"
70 android:layout_height="wrap_content"
71 android:layout_gravity="fill_horizontal"
72 android:text="@string/auth_expired_basic_auth_toast"
73 android:visibility="gone"
74 android:layout_marginBottom="10dp"/>
75 <FrameLayout
76 android:id="@+id/hostUrlFrame"
77 android:layout_width="match_parent"
78 android:layout_height="wrap_content"
79 android:layout_marginBottom="10dp"
80 >
81 <EditText
82 android:id="@+id/hostUrlInput"
83 android:layout_width="match_parent"
84 android:layout_height="wrap_content"
85 android:layout_gravity="bottom"
86 android:hint="@string/auth_host_url"
87 android:inputType="textUri"
88 android:drawablePadding="5dp"
89 android:paddingRight="55dp"
90 >
91 <requestFocus />
92 </EditText>
93 <ImageButton
94 android:id="@+id/embeddedRefreshButton"
95 android:layout_width="48dp"
96 android:layout_height="48dp"
97 android:layout_gravity="center_vertical|right"
98 android:layout_marginRight="5dp"
99 android:padding="0dp"
100 android:scaleType="fitCenter"
101 android:src="@drawable/ic_action_refresh_black"
102 android:onClick="onRefreshClick"
103 android:visibility="gone"
104 android:background="@android:color/transparent"
105 />
106 </FrameLayout>
107
108 <TextView
109 android:id="@+id/server_status_text"
110 android:layout_width="match_parent"
111 android:layout_height="wrap_content"
112 android:layout_marginBottom="10dp"
113 android:drawableLeft="@android:drawable/stat_notify_sync"
114 android:drawablePadding="5dp"
115 android:gravity="center_vertical"
116 android:text="@string/auth_testing_connection" />
117
118 <CheckBox
119 android:id="@+id/oauth_onOff_check"
120 android:layout_width="wrap_content"
121 android:layout_height="wrap_content"
122 android:checked="false"
123 android:onClick="onCheckClick"
124 android:text="@string/oauth_check_onoff"
125 android:textAppearance="?android:attr/textAppearanceSmall"
126 />
127
128 <EditText
129 android:id="@+id/oAuthEntryPoint_1"
130 android:layout_width="match_parent"
131 android:layout_height="wrap_content"
132 android:ems="10"
133 android:enabled="false"
134 android:text="@string/oauth2_url_endpoint_auth"
135 android:singleLine="true"
136 android:inputType="textUri"
137 android:visibility="gone" >
138 </EditText>
139
140 <EditText
141 android:id="@+id/oAuthEntryPoint_2"
142 android:layout_width="match_parent"
143 android:layout_height="wrap_content"
144 android:ems="10"
145 android:enabled="false"
146 android:text="@string/oauth2_url_endpoint_access"
147 android:singleLine="true"
148 android:inputType="textUri"
149 android:visibility="gone" >
150 <requestFocus />
151 </EditText>
152
153 <EditText
154 android:id="@+id/account_name"
155 android:layout_width="match_parent"
156 android:layout_height="wrap_content"
157 android:ems="10"
158 android:hint="@string/auth_account_name"
159 android:inputType="textNoSuggestions"
160 android:visibility="gone" />
161
162 <WebView
163 android:id="@+id/web_sso_view"
164 android:layout_width="match_parent"
165 android:layout_height="wrap_content"
166 android:visibility="gone" />
167
168 <EditText
169 android:id="@+id/account_username"
170 android:layout_width="match_parent"
171 android:layout_height="wrap_content"
172 android:ems="10"
173 android:hint="@string/auth_username"
174 android:inputType="textNoSuggestions" />
175
176 <EditText
177 android:id="@+id/account_password"
178 android:layout_width="match_parent"
179 android:layout_height="wrap_content"
180 android:ems="10"
181 android:hint="@string/auth_password"
182 android:inputType="textPassword"
183 android:drawablePadding="5dp"
184 />
185
186 <TextView
187 android:id="@+id/auth_status_text"
188 android:layout_width="match_parent"
189 android:layout_height="wrap_content"
190 android:gravity="center_vertical"
191 android:text="@string/auth_unauthorized"
192 android:drawableLeft="@android:drawable/stat_notify_sync"
193 android:drawablePadding="5dip"
194 />
195
196 </LinearLayout>
197
198 </ScrollView>
199
200 </LinearLayout>
201
202 <Button
203 android:id="@id/buttonOK"
204 android:layout_width="match_parent"
205 android:layout_height="wrap_content"
206 android:layout_above="@id/account_register"
207 android:layout_centerHorizontal="true"
208 android:enabled="false"
209 android:onClick="onOkClick"
210 android:text="@string/setup_btn_connect"
211 />
212
213 <Button
214 android:id="@+id/account_register"
215 android:layout_width="wrap_content"
216 android:layout_height="wrap_content"
217 android:layout_centerHorizontal="true"
218 android:layout_alignParentBottom="true"
219 android:background="@android:color/transparent"
220 android:textColor="#0000FF"
221 android:onClick="onRegisterClick"
222 android:paddingTop="5dp"
223 android:paddingBottom="5dp"
224 android:text="@string/auth_register"
225 />
226
227 </RelativeLayout>