diff --git a/res/layout-land/account_setup.xml b/res/layout-land/account_setup.xml index 34ac31dadb..1e4417af00 100644 --- a/res/layout-land/account_setup.xml +++ b/res/layout-land/account_setup.xml @@ -64,7 +64,6 @@ android:layout_weight="1" android:ems="10" android:hint="@string/auth_host_url" - android:singleLine="true" android:inputType="textNoSuggestions"> @@ -115,7 +114,6 @@ android:layout_weight="1" android:ems="10" android:hint="@string/auth_username" - android:singleLine="true" android:inputType="textNoSuggestions" /> + android:inputType="textPassword"/> @@ -111,7 +110,6 @@ android:layout_height="0dp" android:layout_weight="1" android:ems="10" - android:singleLine="true" android:hint="@string/auth_username" android:inputType="textNoSuggestions" /> @@ -127,8 +125,7 @@ android:layout_weight="1" android:ems="10" android:hint="@string/auth_password" - android:inputType="textPassword" - android:singleLine="true" /> + android:inputType="textPassword"/> Couldn\'t establish connection Secure connection established Login details + Invalid login / password + Wrong path given + Internal server error, code %1$d Application terminated unexpectedly. Would you like to submit crash report? Send report diff --git a/src/com/owncloud/android/authenticator/AuthenticationRunnable.java b/src/com/owncloud/android/authenticator/AuthenticationRunnable.java index ac547f8f05..63f89bc6c8 100644 --- a/src/com/owncloud/android/authenticator/AuthenticationRunnable.java +++ b/src/com/owncloud/android/authenticator/AuthenticationRunnable.java @@ -22,6 +22,7 @@ import java.net.URL; import org.apache.commons.httpclient.HttpStatus; +import com.owncloud.android.R; import com.owncloud.android.network.OwnCloudClientUtils; import eu.alefzero.webdav.WebdavClient; @@ -64,13 +65,13 @@ public class AuthenticationRunnable implements Runnable { postResult(true, uri.toString()); break; case HttpStatus.SC_UNAUTHORIZED: - postResult(false, "Invalid login or/and password"); + postResult(false, mContext.getString(R.string.auth_unauthorized)); break; case HttpStatus.SC_NOT_FOUND: - postResult(false, "Wrong path given"); + postResult(false, mContext.getString(R.string.auth_not_found)); break; default: - postResult(false, "Internal server error, code: " + login_result); + postResult(false, String.format(mContext.getString(R.string.auth_internal), login_result)); } } diff --git a/src/com/owncloud/android/ui/activity/AuthenticatorActivity.java b/src/com/owncloud/android/ui/activity/AuthenticatorActivity.java index 52714b6a16..c26c0042e9 100644 --- a/src/com/owncloud/android/ui/activity/AuthenticatorActivity.java +++ b/src/com/owncloud/android/ui/activity/AuthenticatorActivity.java @@ -270,7 +270,11 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity // NOTHING TO DO ; can't find out what situation that leads to the exception in this code, but user logs signal that it happens } TextView tv = (TextView) findViewById(R.id.account_username); - tv.setError(message); + tv.setError(message + " "); // the extra spaces are a workaround for an ugly bug: + // 1. insert wrong credentials and connect + // 2. put the focus on the user name field with using hardware controls (don't touch the screen); the error is shown UNDER the field + // 3. touch the user name field; the software keyboard appears; the error popup is moved OVER the field and SHRINKED in width, losing the last word + // Seen, at least, in Android 2.x devices } } public void onCancelClick(View view) {