diff -r ec8af0e3fbc2 -r bcc778a42b8c src/org/gege/caldavsyncadapter/authenticator/AuthenticatorActivity.java --- a/src/org/gege/caldavsyncadapter/authenticator/AuthenticatorActivity.java Tue Feb 10 22:40:00 2015 +0100 +++ b/src/org/gege/caldavsyncadapter/authenticator/AuthenticatorActivity.java Tue Feb 10 22:48:00 2015 +0100 @@ -33,6 +33,7 @@ import android.os.Build; import android.os.Bundle; import android.text.Editable; +import android.text.InputType; import android.text.TextUtils; import android.text.TextWatcher; import android.util.Log; @@ -41,6 +42,7 @@ import android.view.View; import android.view.inputmethod.EditorInfo; import android.widget.CheckBox; +import android.widget.CompoundButton; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; @@ -109,6 +111,8 @@ private String mAccountname; private EditText mAccountnameView; + private CheckBox showPassword; + public AuthenticatorActivity() { super(); @@ -126,6 +130,7 @@ mUser = getIntent().getStringExtra(EXTRA_EMAIL); mUserView = (EditText) findViewById(R.id.user); mUserView.setText(mUser); + mUserView.requestFocus(); mContext = getBaseContext(); @@ -143,6 +148,17 @@ } }); + showPassword = (CheckBox) findViewById(R.id.showPassword); + showPassword.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { + @Override + public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + if(isChecked) { + mPasswordView.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD); + } else { + mPasswordView.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); + } + } + }); mURLView = (EditText) findViewById(R.id.url); // if the URL start with "https" show the option to disable SSL host verification @@ -508,4 +524,4 @@ showProgress(false); } } -} \ No newline at end of file +}