Merge branch 'master' into oauth_login
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / AuthenticatorActivity.java
index fb5c711..fc84df6 100644 (file)
@@ -687,7 +687,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         if (v.getId() == R.id.refreshButton) {\r
             onFocusChange(findViewById(R.id.host_URL), false);\r
         } else if (v.getId() == R.id.viewPassword) {\r
-            TextView view = (TextView) findViewById(R.id.account_password);\r
+            EditText view = (EditText) findViewById(R.id.account_password);\r
+            int selectionStart = view.getSelectionStart();\r
+            int selectionEnd = view.getSelectionEnd();\r
             int input_type = view.getInputType();\r
             if ((input_type & InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) == InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) {\r
                 input_type = InputType.TYPE_CLASS_TEXT\r
@@ -697,6 +699,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
                         | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;\r
             }\r
             view.setInputType(input_type);\r
+            view.setSelection(selectionStart, selectionEnd);\r
         }\r
     }\r
     \r