From d9e9d3fc48bc7cfd8a8c93d6d28fdcb5cbaccd8c Mon Sep 17 00:00:00 2001 From: Tim Su Date: Thu, 22 Dec 2011 21:05:54 -0800 Subject: [PATCH] On actfm login, make the text boxes the right input type --- .../com/todoroo/astrid/actfm/ActFmLoginActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java index b810a5403..4baac9a35 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java @@ -40,6 +40,7 @@ import android.content.res.Configuration; import android.graphics.PixelFormat; import android.os.Build; import android.os.Bundle; +import android.text.InputType; import android.text.method.PasswordTransformationMethod; import android.view.View; import android.view.View.OnClickListener; @@ -224,6 +225,9 @@ public class ActFmLoginActivity extends Activity implements AuthListener { final EditText name = addEditField(body, R.string.actfm_ALA_name_label); + name.setInputType(InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_PERSON_NAME | + InputType.TYPE_TEXT_FLAG_CAP_WORDS); final AtomicReference dialog = new AtomicReference(); final AtomicBoolean isNew = new AtomicBoolean(true); @@ -255,6 +259,8 @@ public class ActFmLoginActivity extends Activity implements AuthListener { final EditText email = addEditField(body, R.string.actfm_ALA_email_label); + email.setInputType(InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); getCredentials(new OnGetCredentials() { @Override public void getCredentials(String[] accounts) { @@ -265,6 +271,8 @@ public class ActFmLoginActivity extends Activity implements AuthListener { final EditText password = addEditField(body, R.string.actfm_ALA_password_label); + password.setInputType(InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_PASSWORD); password.setTransformationMethod(new PasswordTransformationMethod()); password.setText(generateRandomPassword());