Review of login view layout optimizing the adaption to different screen sizes
authorDavid A. Velasco <dvelasco@solidgear.es>
Fri, 10 May 2013 14:35:01 +0000 (16:35 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Fri, 10 May 2013 14:35:01 +0000 (16:35 +0200)
res/drawable-hdpi/logo.png [new file with mode: 0644]
res/drawable-hdpi/owncloud_logo.png [deleted file]
res/drawable-ldpi/logo.png [new file with mode: 0644]
res/drawable-ldpi/owncloud_logo.png [deleted file]
res/drawable-mdpi/logo.png [new file with mode: 0644]
res/drawable-mdpi/owncloud_logo.png [deleted file]
res/layout-land/account_setup.xml
res/layout/account_setup.xml
res/layout/file_preview.xml
res/values/strings.xml
src/com/owncloud/android/authentication/AuthenticatorActivity.java

diff --git a/res/drawable-hdpi/logo.png b/res/drawable-hdpi/logo.png
new file mode 100644 (file)
index 0000000..ecea3b0
Binary files /dev/null and b/res/drawable-hdpi/logo.png differ
diff --git a/res/drawable-hdpi/owncloud_logo.png b/res/drawable-hdpi/owncloud_logo.png
deleted file mode 100644 (file)
index ecea3b0..0000000
Binary files a/res/drawable-hdpi/owncloud_logo.png and /dev/null differ
diff --git a/res/drawable-ldpi/logo.png b/res/drawable-ldpi/logo.png
new file mode 100644 (file)
index 0000000..62dff25
Binary files /dev/null and b/res/drawable-ldpi/logo.png differ
diff --git a/res/drawable-ldpi/owncloud_logo.png b/res/drawable-ldpi/owncloud_logo.png
deleted file mode 100644 (file)
index 62dff25..0000000
Binary files a/res/drawable-ldpi/owncloud_logo.png and /dev/null differ
diff --git a/res/drawable-mdpi/logo.png b/res/drawable-mdpi/logo.png
new file mode 100644 (file)
index 0000000..ecea3b0
Binary files /dev/null and b/res/drawable-mdpi/logo.png differ
diff --git a/res/drawable-mdpi/owncloud_logo.png b/res/drawable-mdpi/owncloud_logo.png
deleted file mode 100644 (file)
index ecea3b0..0000000
Binary files a/res/drawable-mdpi/owncloud_logo.png and /dev/null differ
index ce78ace..f6a0280 100644 (file)
   You should have received a copy of the GNU General Public License\r
   along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
 -->\r
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
-    xmlns:oc="http://schemas.android.com/apk/res/com.owncloud.android"\r
-    android:layout_width="fill_parent"\r
-    android:layout_height="fill_parent"\r
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
+    android:layout_width="match_parent"\r
+    android:layout_height="match_parent"\r
+    android:gravity="center|fill" \r
+       android:padding="16dip"\r
     android:focusable="true"\r
-    android:gravity="center|fill"\r
-    android:orientation="vertical" >\r
+    >\r
 \r
-    <FrameLayout\r
+    <LinearLayout\r
         android:layout_width="match_parent"\r
         android:layout_height="wrap_content"\r
-        android:layout_gravity="center"\r
-        android:layout_marginLeft="16dip"\r
-        android:layout_marginRight="16dip"\r
-        android:layout_weight="1" >\r
-\r
-        <LinearLayout\r
-            android:layout_width="match_parent"\r
-            android:layout_height="match_parent" >\r
-\r
-            <ImageView\r
-                android:id="@+id/imageView1"\r
-                android:layout_width="match_parent"\r
-                android:layout_height="match_parent"\r
-                android:layout_margin="7dp"\r
-                android:layout_weight="1"\r
-                android:src="@drawable/owncloud_logo" />\r
-\r
-            <LinearLayout\r
-                android:id="@+id/LinearLayout1"\r
-                android:layout_width="match_parent"\r
-                android:layout_height="wrap_content"\r
-                android:layout_gravity="center"\r
-                android:layout_weight="1"\r
-                android:orientation="vertical" >\r
-\r
-                <FrameLayout\r
-                    android:layout_width="match_parent"\r
-                    android:layout_height="wrap_content"\r
-                    android:layout_weight="1" >\r
-\r
-                    <EditText\r
-                        android:id="@+id/hostUrlInput"\r
-                        android:layout_width="match_parent"\r
-                        android:layout_height="wrap_content"\r
-                        android:ems="10"\r
-                        android:hint="@string/auth_host_url"\r
-                        android:inputType="textNoSuggestions">\r
-                        <requestFocus />\r
-                    </EditText>\r
-\r
-                    <ImageView\r
-                        android:id="@+id/refreshButton"\r
-                        android:layout_width="wrap_content"\r
-                        android:layout_height="wrap_content"\r
-                        android:layout_gravity="right|center_vertical"\r
-                        android:src="@drawable/ic_action_refresh_black"\r
-                       android:onClick="onRefreshClick"\r
-                        android:visibility="invisible" />\r
-                </FrameLayout>\r
-\r
-                <LinearLayout\r
-                    android:layout_width="match_parent"\r
-                    android:layout_height="50dp"\r
-                    android:layout_weight="1" >\r
-\r
-                    <ImageView\r
-                        android:id="@+id/action_indicator"\r
-                        android:layout_width="wrap_content"\r
-                        android:layout_height="wrap_content"\r
-                        android:layout_marginLeft="5dp"\r
-                        android:layout_marginRight="5dp"\r
-                        android:src="@android:drawable/stat_notify_sync"\r
-                        android:visibility="invisible" />\r
-\r
-                    <TextView\r
-                        android:id="@+id/status_text"\r
-                        android:layout_width="wrap_content"\r
-                        android:layout_height="wrap_content"\r
-                        android:text="TextView"\r
-                        android:visibility="invisible" />\r
-                </LinearLayout>\r
-\r
-                <CheckBox\r
-                    android:id="@+id/oauth_onOff_check"\r
-                    android:layout_width="wrap_content"\r
-                    android:layout_height="wrap_content"\r
-                    android:checked="false"\r
-                    android:onClick="onCheckClick"\r
-                    android:text="@string/oauth_check_onoff"\r
-                    android:textAppearance="?android:attr/textAppearanceSmall" />\r
-\r
-                <TextView\r
-                    android:id="@+id/textView2"\r
-                    android:layout_width="wrap_content"\r
-                    android:layout_height="0dp"\r
-                    android:layout_weight="1"\r
-                    android:text="@string/auth_login_details"\r
-                    android:textAppearance="?android:attr/textAppearanceSmall" />\r
-\r
-                   <EditText\r
-                       android:id="@+id/oAuthEntryPoint_1"\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="wrap_content"\r
-                       android:layout_weight="1"\r
-                       android:ems="10"\r
-                       android:enabled="false"\r
-                       android:text="@string/oauth2_url_endpoint_auth"\r
-                       android:singleLine="true"\r
-                       android:visibility="gone" >\r
-       \r
-                       <requestFocus />\r
-                   </EditText>            \r
-       \r
-                   <EditText\r
-                       android:id="@+id/oAuthEntryPoint_2"\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="wrap_content"\r
-                       android:layout_weight="1"\r
-                       android:ems="10"\r
-                       android:enabled="false"\r
-                       android:text="@string/oauth2_url_endpoint_access"\r
-                       android:singleLine="true"\r
-                       android:visibility="gone" >\r
-       \r
-                       <requestFocus />\r
-                   </EditText>            \r
-       \r
-                <EditText\r
-                    android:id="@+id/account_username"\r
-                    android:layout_width="match_parent"\r
-                    android:layout_height="0dp"\r
-                    android:layout_weight="1"\r
-                    android:ems="10"\r
-                    android:hint="@string/auth_username"\r
-                    android:inputType="textNoSuggestions" />\r
-\r
-                <FrameLayout\r
-                    android:layout_width="match_parent"\r
-                    android:layout_height="wrap_content"\r
-                    android:layout_weight="1" >\r
-\r
-                    <EditText\r
-                        android:id="@+id/account_password"\r
-                        android:layout_width="match_parent"\r
-                        android:layout_height="wrap_content"\r
-                        android:ems="10"\r
-                        android:hint="@string/auth_password"\r
-                        android:inputType="textPassword"/>\r
-\r
-                    <ImageView\r
-                        android:id="@+id/viewPasswordButton"\r
-                        android:layout_width="wrap_content"\r
-                        android:layout_height="wrap_content"\r
-                        android:layout_gravity="right|center_vertical"\r
-                        android:src="@android:drawable/ic_menu_view"\r
-                                               android:onClick="onViewPasswordClick"\r
-                        android:visibility="invisible" />\r
-                </FrameLayout>\r
-                \r
-                   <TextView\r
-                       android:id="@+id/auth_status_text"\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="wrap_content"\r
-                       android:layout_weight="1" \r
-                       android:text="@string/text_placeholder"\r
-                       android:layout_marginLeft="5dp"\r
-                       android:layout_marginRight="5dp"\r
-                                       android:drawableLeft="@android:drawable/stat_notify_sync"\r
-                               android:drawablePadding="5dip"\r
-                               android:visibility="invisible"                \r
-                       />\r
-                \r
-            </LinearLayout>\r
-            \r
-        </LinearLayout>\r
-    </FrameLayout>\r
-\r
-    <RelativeLayout\r
-        android:layout_width="match_parent"\r
-        android:layout_height="wrap_content"\r
-        android:layout_alignParentBottom="true" >\r
-\r
-        <LinearLayout\r
-            android:id="@+id/buttons_layout"        \r
-            android:layout_width="match_parent"\r
-            android:layout_height="wrap_content"\r
-            android:weightSum="1">\r
-\r
-            <Button\r
-                android:id="@+id/buttonOK"\r
-                android:layout_width="match_parent"\r
-                android:layout_height="wrap_content"\r
-                android:layout_weight=".5"\r
-                android:layout_marginLeft="16dip"\r
-                       android:layout_marginRight="16dip"\r
-                android:enabled="false"\r
-                android:onClick="onOkClick"\r
-                android:text="@string/setup_btn_connect"\r
-                android:textColor="@android:color/black" />\r
-            \r
-        </LinearLayout>\r
+               android:layout_alignParentTop="true"\r
+               android:layout_above="@+id/buttonOK"\r
+               android:orientation="horizontal" \r
+        >\r
         \r
-               <Button\r
-                       android:id="@+id/account_register"\r
+       <ImageView\r
+               android:id="@+id/imageView1"\r
+               android:layout_width="0dp"\r
+               android:layout_height="wrap_content"\r
+               android:layout_weight="1"\r
+               android:layout_gravity="center"\r
+               android:src="@drawable/logo" \r
+               />\r
+       \r
+       <LinearLayout\r
+               android:id="@+id/LinearLayout1"\r
+               android:layout_width="0dp"\r
+               android:layout_height="wrap_content"\r
+               android:layout_weight="1"\r
+               android:layout_gravity="center"\r
+               android:orientation="vertical" \r
+               >\r
+\r
+               <FrameLayout\r
+                       android:layout_width="match_parent"\r
+                       android:layout_height="wrap_content"\r
+               >\r
+\r
+                       <EditText\r
+                               android:id="@+id/hostUrlInput"\r
+                               android:layout_width="match_parent"\r
+                               android:layout_height="wrap_content"\r
+                               android:ems="10"\r
+                               android:hint="@string/auth_host_url"\r
+                               android:inputType="textUri"\r
+                               >\r
+                               <requestFocus />\r
+                       </EditText>\r
+\r
+                       <ImageView\r
+                               android:id="@+id/refreshButton"\r
+                               android:layout_width="wrap_content"\r
+                               android:layout_height="wrap_content"\r
+                               android:layout_gravity="right|center_vertical"\r
+                               android:src="@drawable/ic_action_refresh_black"\r
+                               android:onClick="onRefreshClick"\r
+                               android:visibility="invisible" />\r
+                       \r
+               </FrameLayout>\r
+\r
+               <TextView\r
+                       android:id="@+id/server_status_text"\r
+                       android:layout_width="match_parent"\r
+                       android:layout_height="wrap_content"\r
+                       android:layout_marginBottom="10dp"\r
+                       android:drawableLeft="@android:drawable/stat_notify_sync"\r
+                       android:drawablePadding="5dp"\r
+                       android:gravity="center_vertical"\r
+                       android:text="@string/auth_testing_connection" />\r
+             \r
+               <CheckBox\r
+                       android:id="@+id/oauth_onOff_check"\r
                        android:layout_width="wrap_content"\r
                        android:layout_height="wrap_content"\r
-                       android:layout_below="@id/buttons_layout"\r
-                       android:layout_centerHorizontal="true"\r
-                       android:onClick="onRegisterClick"\r
-                       android:paddingTop="10dp"\r
-                       android:paddingBottom="10dp"\r
-                       android:textColor="#0000FF"\r
-                       android:background="@android:color/transparent" />\r
-                       <!-- android:text="@string/app_name @string/auth_register" /-->\r
-        \r
-    </RelativeLayout>\r
+                       android:checked="false"\r
+                       android:onClick="onCheckClick"\r
+                       android:text="@string/oauth_check_onoff"\r
+                       android:textAppearance="?android:attr/textAppearanceSmall"\r
+                       android:visibility="gone"\r
+                       />\r
+\r
+               <EditText\r
+                       android:id="@+id/oAuthEntryPoint_1"\r
+                       android:layout_width="match_parent"\r
+                       android:layout_height="wrap_content"\r
+                       android:ems="10"\r
+                       android:enabled="false"\r
+                       android:text="@string/oauth2_url_endpoint_auth"\r
+                       android:singleLine="true"\r
+                       android:inputType="textUri"\r
+                       android:visibility="gone" >\r
+                       <requestFocus />\r
+               </EditText>            \r
+               \r
+               <EditText\r
+                       android:id="@+id/oAuthEntryPoint_2"\r
+                       android:layout_width="match_parent"\r
+                       android:layout_height="wrap_content"\r
+                       android:ems="10"\r
+                       android:enabled="false"\r
+                       android:text="@string/oauth2_url_endpoint_access"\r
+                       android:singleLine="true"\r
+                       android:inputType="textUri"\r
+                       android:visibility="gone" >\r
+                       <requestFocus />\r
+               </EditText>            \r
+\r
+               <EditText\r
+                       android:id="@+id/account_username"\r
+                       android:layout_width="match_parent"\r
+                       android:layout_height="wrap_content"\r
+                       android:ems="10"\r
+                       android:hint="@string/auth_username"\r
+                       android:inputType="textNoSuggestions" />\r
 \r
-</LinearLayout>\r
+               <FrameLayout\r
+                       android:layout_width="match_parent"\r
+                       android:layout_height="wrap_content"\r
+                       >\r
+                       <EditText\r
+                               android:id="@+id/account_password"\r
+                               android:layout_width="match_parent"\r
+                               android:layout_height="wrap_content"\r
+                               android:ems="10"\r
+                               android:hint="@string/auth_password"\r
+                               android:inputType="textPassword"/>\r
+                       \r
+                       <ImageView\r
+                               android:id="@+id/viewPasswordButton"\r
+                               android:layout_width="wrap_content"\r
+                               android:layout_height="wrap_content"\r
+                               android:layout_gravity="right|center_vertical"\r
+                               android:src="@android:drawable/ic_menu_view"\r
+                               android:onClick="onViewPasswordClick"\r
+                               android:visibility="invisible" />\r
+               </FrameLayout>\r
+     \r
+               <TextView\r
+                       android:id="@+id/auth_status_text"\r
+                       android:layout_width="match_parent"\r
+                       android:layout_height="wrap_content"\r
+                       android:gravity="center_vertical"\r
+                       android:text="@string/auth_unauthorized"\r
+                       android:drawableLeft="@android:drawable/stat_notify_sync"\r
+                       android:drawablePadding="5dip"\r
+                       />\r
+                  \r
+       </LinearLayout>\r
+       </LinearLayout>\r
+       \r
+       <Button\r
+               android:id="@id/buttonOK"\r
+               android:layout_width="match_parent"\r
+               android:layout_height="wrap_content"\r
+               android:layout_above="@id/account_register"\r
+               android:layout_centerHorizontal="true"\r
+               android:enabled="false"\r
+               android:onClick="onOkClick"\r
+               android:text="@string/setup_btn_connect"\r
+               />\r
+\r
+       <Button\r
+               android:id="@+id/account_register"\r
+               android:layout_width="match_parent"\r
+               android:layout_height="wrap_content"\r
+               android:layout_alignParentBottom="true"\r
+               android:layout_marginTop="10dp"\r
+               android:layout_centerHorizontal="true"\r
+               android:onClick="onRegisterClick"\r
+               android:textColor="#0000FF"\r
+               android:background="@android:color/transparent"\r
+               android:text="@string/auth_register" \r
+               />\r
+       \r
+</RelativeLayout>\r
index d541c09..7171133 100644 (file)
   along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
 -->\r
 \r
-\r
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"\r
+    xmlns:tools="http://schemas.android.com/tools"\r
     android:layout_width="match_parent"\r
     android:layout_height="match_parent"\r
-    android:orientation="vertical" >\r
-\r
-       <LinearLayout\r
-           android:layout_width="match_parent"\r
-           android:layout_height="wrap_content"\r
-           android:layout_gravity="center"\r
-           android:focusable="true"\r
-           android:gravity="center"\r
-           android:orientation="vertical" >\r
-\r
-       <FrameLayout\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="0dip"\r
-                       android:layout_gravity="center"\r
-                       android:layout_marginBottom="50dip"\r
-                       android:layout_marginLeft="16dip"\r
-                       android:layout_marginRight="16dip"\r
-                       android:layout_weight="1" >\r
-               \r
-                       <LinearLayout\r
-                               android:id="@+id/LinearLayout1"\r
-                               android:layout_width="match_parent"\r
-                               android:layout_height="wrap_content"\r
-                               android:layout_gravity="center"\r
-                               android:orientation="vertical" >\r
-               \r
-                               <ImageView\r
-                                       android:id="@+id/imageView1"\r
-                                       android:layout_width="match_parent"\r
-                                       android:layout_height="wrap_content"\r
-                                       android:layout_marginBottom="10dp"\r
-                                       android:layout_weight="1"\r
-                                       android:src="@drawable/owncloud_logo" />\r
-               \r
-                   <FrameLayout\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="wrap_content"\r
-                       android:layout_weight="1" >\r
-       \r
-                       <EditText\r
-                           android:id="@+id/hostUrlInput"\r
-                           android:layout_width="match_parent"\r
-                           android:layout_height="wrap_content"\r
-                           android:ems="10"\r
-                           android:hint="@string/auth_host_url"\r
-                           android:inputType="textNoSuggestions" >\r
-                           <requestFocus />\r
-                       </EditText>\r
-       \r
-                       <ImageView\r
-                           android:id="@+id/refreshButton"\r
-                           android:layout_width="wrap_content"\r
-                           android:layout_height="wrap_content"\r
-                           android:src="@drawable/ic_action_refresh_black"\r
-                           android:layout_gravity="right|center_vertical"\r
-                           android:visibility="invisible" />\r
-       \r
-                   </FrameLayout>\r
-       \r
-                   <LinearLayout\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="50dp"\r
-                       android:layout_weight="1" >\r
-       \r
-                       <ImageView\r
-                           android:id="@+id/action_indicator"\r
-                           android:layout_width="wrap_content"\r
-                           android:layout_height="wrap_content"\r
-                           android:layout_marginLeft="5dp"\r
-                           android:layout_marginRight="5dp"\r
-                           android:src="@android:drawable/stat_notify_sync"\r
-                           android:visibility="invisible" />\r
-       \r
-                       <TextView\r
-                           android:id="@+id/status_text"\r
-                           android:layout_width="wrap_content"\r
-                           android:layout_height="wrap_content"\r
-                           android:text="TextView"\r
-                           android:visibility="invisible" />\r
-       \r
-                   </LinearLayout>\r
-       \r
-                   <CheckBox\r
-                       android:id="@+id/oauth_onOff_check"\r
-                       android:layout_width="wrap_content"\r
-                       android:layout_height="wrap_content"\r
-                       android:checked="false"\r
-                       android:onClick="onCheckClick"\r
-                       android:text="@string/oauth_check_onoff"\r
-                       android:textAppearance="?android:attr/textAppearanceSmall" />\r
-       \r
-                               <TextView\r
-                       android:id="@+id/textView2"\r
-                       android:layout_width="wrap_content"\r
-                       android:layout_height="0dp"\r
-                       android:layout_weight="1"\r
-                       android:text="@string/auth_login_details"\r
-                       android:textAppearance="?android:attr/textAppearanceSmall" />\r
-       \r
-                   <EditText\r
-                       android:id="@+id/oAuthEntryPoint_1"\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="wrap_content"\r
-                       android:layout_weight="1"\r
-                       android:ems="10"\r
-                       android:text="@string/oauth2_url_endpoint_auth"\r
-                       android:singleLine="true"\r
-                       android:visibility="gone" >\r
-       \r
-                       <requestFocus />\r
-                   </EditText>            \r
-       \r
-                   <EditText\r
-                       android:id="@+id/oAuthEntryPoint_2"\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="wrap_content"\r
-                       android:layout_weight="1"\r
-                       android:ems="10"\r
-                           android:text="@string/oauth2_url_endpoint_access"\r
-                       android:singleLine="true"\r
-                       android:visibility="gone" >\r
-       \r
-                       <requestFocus />\r
-                   </EditText>            \r
-       \r
-                               <EditText\r
-                       android:id="@+id/account_username"\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="0dp"\r
-                       android:layout_weight="1"\r
-                       android:ems="10"\r
-                       android:hint="@string/auth_username"\r
-                       android:inputType="textNoSuggestions" />\r
-       \r
-                   <FrameLayout\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="wrap_content"\r
-                       android:layout_weight="1" >\r
-       \r
-                       <EditText\r
-                           android:id="@+id/account_password"\r
-                           android:layout_width="match_parent"\r
-                           android:layout_height="wrap_content"\r
-                           android:ems="10"\r
-                           android:hint="@string/auth_password"\r
-                           android:inputType="textPassword"/>\r
-       \r
-                       <ImageView\r
-                           android:id="@+id/viewPasswordButton"\r
-                           android:layout_width="wrap_content"\r
-                           android:layout_height="wrap_content"\r
-                           android:layout_gravity="right|center_vertical"\r
-                           android:src="@android:drawable/ic_menu_view"\r
-                                               android:onClick="onViewPasswordClick"\r
-                           android:visibility="invisible" />\r
-       \r
-                   </FrameLayout>\r
-               \r
-                   <TextView\r
-                       android:id="@+id/auth_status_text"\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="wrap_content"\r
-                       android:layout_weight="1" \r
-                       android:text="@string/text_placeholder"\r
-                       android:layout_marginLeft="5dp"\r
-                       android:layout_marginRight="5dp"\r
-                                       android:drawableLeft="@android:drawable/stat_notify_sync"\r
-                               android:drawablePadding="5dip"\r
-                               android:visibility="invisible"                \r
-                       />\r
-                           \r
-                  </LinearLayout>\r
-       \r
-           </FrameLayout>\r
-       \r
-           <RelativeLayout\r
-               android:layout_width="match_parent"\r
-               android:layout_height="wrap_content">\r
-       \r
-               <LinearLayout\r
-                   android:id="@+id/buttons_layout"\r
-                   android:layout_width="match_parent"\r
-                   android:layout_height="wrap_content"\r
-                   android:weightSum="1">\r
-       \r
-                   <Button\r
-                       android:id="@+id/buttonOK"\r
-                       android:layout_width="match_parent"\r
-                       android:layout_height="wrap_content"\r
-                           android:layout_gravity="center_horizontal"\r
-                               android:layout_marginLeft="16dip"\r
-                           android:layout_marginRight="16dip"\r
-                       android:enabled="false"\r
-                       android:onClick="onOkClick"\r
-                       android:text="@string/setup_btn_connect"\r
-                       android:textColor="@android:color/black" />\r
-       \r
-               </LinearLayout>\r
-               \r
-                       <Button\r
-                               android:id="@+id/account_register"\r
-                               android:layout_width="wrap_content"\r
-                               android:layout_height="wrap_content"\r
-                               android:layout_below="@id/buttons_layout"\r
-                               android:layout_centerHorizontal="true"\r
-                               android:onClick="onRegisterClick"\r
-                               android:paddingTop="10dp"\r
-                               android:paddingBottom="10dp"\r
-                               android:textColor="#0000FF"\r
-                               android:background="@android:color/transparent" />\r
-                       \r
-                       <Button\r
-                               android:id="@+id/account_register"\r
-                               android:layout_width="wrap_content"\r
-                               android:layout_height="wrap_content"\r
-                               android:layout_below="@id/buttons_layout"\r
-                               android:layout_centerHorizontal="true"\r
-                               android:onClick="onRegisterClick"\r
-                               android:paddingTop="10dp"\r
-                               android:paddingBottom="10dp"\r
-                               android:textColor="#0000FF"\r
-                               android:background="@android:color/transparent" />\r
-                               <!-- android:text="@string/app_name @string/auth_register" /-->\r
-               \r
-           </RelativeLayout>\r
-\r
-       </LinearLayout>\r
-                       \r
-</ScrollView>\r
+    android:layout_gravity="center"\r
+       android:padding="16dip"\r
+    android:fillViewport="true"\r
+    android:orientation="vertical"\r
+    >\r
+\r
+    <LinearLayout\r
+        android:layout_width="match_parent"\r
+        android:layout_height="wrap_content"\r
+        android:gravity="center"\r
+        android:orientation="vertical" \r
+        android:focusable="true"\r
+        >\r
+\r
+        <ImageView\r
+            android:id="@+id/imageView1"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="wrap_content"\r
+            android:layout_marginBottom="10dp"\r
+            android:layout_marginTop="10dp"\r
+            android:src="@drawable/logo" />\r
+\r
+        <FrameLayout\r
+            android:layout_width="match_parent"\r
+            android:layout_height="wrap_content" >\r
+\r
+            <EditText\r
+                android:id="@+id/hostUrlInput"\r
+                android:layout_width="match_parent"\r
+                android:layout_height="wrap_content"\r
+                android:ems="10"\r
+                android:hint="@string/auth_host_url"\r
+                android:inputType="textUri" >\r
+\r
+                <requestFocus />\r
+            </EditText>\r
+\r
+            <ImageView\r
+                android:id="@+id/refreshButton"\r
+                android:layout_width="wrap_content"\r
+                android:layout_height="wrap_content"\r
+                android:layout_gravity="right|center_vertical"\r
+                android:src="@drawable/ic_action_refresh_black"\r
+                android:visibility="invisible" />\r
+        </FrameLayout>\r
+\r
+        <TextView\r
+            android:id="@+id/server_status_text"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="wrap_content"\r
+            android:layout_marginBottom="10dp"\r
+            android:drawableLeft="@android:drawable/stat_notify_sync"\r
+            android:drawablePadding="5dp"\r
+            android:gravity="center_vertical"\r
+            android:text="@string/auth_testing_connection" />\r
+\r
+        <CheckBox\r
+            android:id="@+id/oauth_onOff_check"\r
+            android:layout_width="wrap_content"\r
+            android:layout_height="wrap_content"\r
+            android:checked="false"\r
+            android:onClick="onCheckClick"\r
+            android:text="@string/oauth_check_onoff"\r
+            android:textAppearance="?android:attr/textAppearanceSmall"\r
+            android:visibility="gone" />\r
+\r
+        <EditText\r
+            android:id="@+id/oAuthEntryPoint_1"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="wrap_content"\r
+            android:ems="10"\r
+            android:inputType="textUri"\r
+            android:singleLine="true"\r
+            android:text="@string/oauth2_url_endpoint_auth"\r
+            android:visibility="gone" >\r
+        </EditText>\r
+\r
+        <EditText\r
+            android:id="@+id/oAuthEntryPoint_2"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="wrap_content"\r
+            android:ems="10"\r
+            android:inputType="textUri"\r
+            android:singleLine="true"\r
+            android:text="@string/oauth2_url_endpoint_access"\r
+            android:visibility="gone" />\r
+\r
+        <EditText\r
+            android:id="@+id/account_username"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="wrap_content"\r
+            android:ems="10"\r
+            android:hint="@string/auth_username"\r
+            android:inputType="textNoSuggestions" />\r
+\r
+        <FrameLayout\r
+            android:layout_width="match_parent"\r
+            android:layout_height="wrap_content" >\r
+\r
+            <EditText\r
+                android:id="@+id/account_password"\r
+                android:layout_width="match_parent"\r
+                android:layout_height="wrap_content"\r
+                android:ems="10"\r
+                android:hint="@string/auth_password"\r
+                android:inputType="textPassword" />\r
+\r
+            <ImageView\r
+                android:id="@+id/viewPasswordButton"\r
+                android:layout_width="wrap_content"\r
+                android:layout_height="wrap_content"\r
+                android:layout_gravity="right|center_vertical"\r
+                android:onClick="onViewPasswordClick"\r
+                android:src="@android:drawable/ic_menu_view"\r
+                android:visibility="invisible" />\r
+        </FrameLayout>\r
+\r
+        <TextView\r
+            android:id="@+id/auth_status_text"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="wrap_content"\r
+            android:layout_marginBottom="10dp"\r
+            android:drawableLeft="@android:drawable/stat_notify_sync"\r
+            android:drawablePadding="5dp"\r
+            android:gravity="center_vertical"\r
+            android:text="@string/auth_unauthorized" />\r
+\r
+        <Button\r
+            android:id="@+id/buttonOK"\r
+            android:layout_width="match_parent"\r
+            android:layout_height="wrap_content"\r
+            android:layout_gravity="center_horizontal"\r
+            android:enabled="false"\r
+            android:onClick="onOkClick"\r
+            android:text="@string/setup_btn_connect"\r
+            android:textColor="@android:color/black" />\r
+\r
+        <Button\r
+            android:id="@+id/account_register"\r
+            android:layout_width="wrap_content"\r
+            android:layout_height="wrap_content"\r
+            android:background="@android:color/transparent"\r
+            android:onClick="onRegisterClick"\r
+            android:paddingBottom="10dp"\r
+            android:paddingTop="10dp"\r
+            android:text="@string/auth_register"\r
+            android:textColor="#0000FF" />\r
+    </LinearLayout>\r
+\r
+</ScrollView>
\ No newline at end of file
index 22528a7..ec69fe7 100644 (file)
@@ -42,7 +42,7 @@
                android:layout_margin="16dp"
                android:layout_gravity="center"
                android:contentDescription="@string/preview_image_description"
-               android:src="@drawable/owncloud_logo" />
+               android:src="@drawable/logo" />
            
                <VideoView  
                    android:id="@+id/video_preview"
index 7520dc6..2d6de4b 100644 (file)
     <string name="auth_bad_oc_version_title">Unrecognized server version</string>
     <string name="auth_wrong_connection_title">Couldn\'t establish connection</string>
     <string name="auth_secure_connection">Secure connection established</string>
-    <string name="auth_login_details">Login details</string>
     <string name="auth_unauthorized">Invalid credentials</string>
        <string name="auth_oauth_error">Unsuccessful authorization</string>
        <string name="auth_oauth_error_access_denied">Access denied by authorization server</string>
index ef5c21b..e4787fb 100644 (file)
@@ -178,6 +178,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
             mStatusText = mStatusIcon = 0;\r
             mStatusCorrect = false;\r
             mIsSslConn = false;\r
+            updateConnStatus();\r
+            updateAuthStatus();\r
             \r
             /// retrieve extras from intent\r
             String tokenType = getIntent().getExtras().getString(AccountAuthenticator.KEY_AUTH_TOKEN_TYPE);\r
@@ -270,7 +272,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         updateConnStatus();\r
         \r
         /// UI settings depending upon connection\r
-        mOkButton.setEnabled(mStatusCorrect);   // TODO really necessary?\r
+        mOkButton.setEnabled(mStatusCorrect);  \r
         if (!mStatusCorrect)\r
             mRefreshButton.setVisibility(View.VISIBLE); // seems that setting visibility is necessary\r
         else\r
@@ -347,7 +349,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
 \r
         /// GET ACCESS TOKEN to the oAuth server \r
         RemoteOperation operation = new OAuth2GetAccessToken(   getString(R.string.oauth2_client_id), \r
-                                                                getString(R.string.oauth2_redirect_uri), // TODO check - necessary here?      \r
+                                                                getString(R.string.oauth2_redirect_uri),       \r
                                                                 getString(R.string.oauth2_grant_type),\r
                                                                 queryParameters);\r
         //WebdavClient client = OwnCloudClientUtils.createOwnCloudClient(Uri.parse(getString(R.string.oauth2_url_endpoint_access)), getApplicationContext());\r
@@ -964,16 +966,13 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
      * to the last check on the ownCloud server.\r
      */\r
     private void updateConnStatus() {\r
-        ImageView iv = (ImageView) findViewById(R.id.action_indicator);\r
-        TextView tv = (TextView) findViewById(R.id.status_text);\r
+        TextView tv = (TextView) findViewById(R.id.server_status_text);\r
 \r
         if (mStatusIcon == 0 && mStatusText == 0) {\r
-            iv.setVisibility(View.INVISIBLE);\r
             tv.setVisibility(View.INVISIBLE);\r
         } else {\r
-            iv.setImageResource(mStatusIcon);\r
             tv.setText(mStatusText);\r
-            iv.setVisibility(View.VISIBLE);\r
+            tv.setCompoundDrawablesWithIntrinsicBounds(mStatusIcon, 0, 0, 0);\r
             tv.setVisibility(View.VISIBLE);\r
         }\r
     }\r