account_setup.xml 8.9 KB

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