import android.view.View.OnFocusChangeListener;\r
import android.view.Window;\r
import android.widget.Button;\r
+import android.widget.EditText;\r
import android.widget.ImageView;\r
import android.widget.TextView;\r
import com.owncloud.android.R;\r
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
| InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;\r
}\r
view.setInputType(input_type);\r
+ view.setSelection(selectionStart, selectionEnd);\r
}\r
}\r
\r