Merged request #3
[pub/Android/ownCloud.git] / src / eu / alefzero / owncloud / ui / activity / AuthenticatorActivity.java
index 79781f3..31874ad 100644 (file)
@@ -32,9 +32,11 @@ import android.content.Intent;
 import android.graphics.Color;\r
 import android.os.Bundle;\r
 import android.os.Handler;\r
+import android.text.InputType;\r
 import android.util.Log;\r
 import android.view.View;\r
 import android.view.Window;\r
+import android.widget.CheckBox;\r
 import android.widget.TextView;\r
 import android.widget.Toast;\r
 import eu.alefzero.owncloud.R;\r
@@ -188,4 +190,21 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity {
                 mHandler,\r
                 AuthenticatorActivity.this);\r
     }\r
+    \r
+    /**\r
+     * Handles the show password checkbox\r
+     * @author robstar\r
+     * @param view\r
+     */\r
+    public void onCheckboxClick(View view) {\r
+       CheckBox checkbox = (CheckBox) findViewById(R.id.show_password);\r
+       TextView password_text = (TextView) findViewById(R.id.account_password);\r
+       \r
+       if(checkbox.isChecked()) {\r
+               password_text.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);\r
+       } else {\r
+               password_text.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);\r
+       }\r
+       \r
+    }\r
 }\r