diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java
index 16a703cd7..c042010ab 100644
--- a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java
+++ b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java
@@ -45,10 +45,12 @@ import android.text.style.ClickableSpan;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
-import android.widget.ToggleButton;
import com.facebook.android.AsyncFacebookRunner;
import com.facebook.android.AsyncFacebookRunner.RequestListener;
@@ -158,7 +160,7 @@ public class ActFmLoginActivity extends Activity implements AuthListener {
@Override
public void updateDrawState(TextPaint ds) {
ds.setUnderlineText(true);
- ds.linkColor = Color.rgb(255, 96, 0);
+ ds.setColor(Color.rgb(255, 96, 0));
}
};
link.setSpan(linkSpan, pwLoginBase.length() + 1, link.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
@@ -187,21 +189,25 @@ public class ActFmLoginActivity extends Activity implements AuthListener {
private final OnClickListener signUpListener = new OnClickListener() {
@Override
public void onClick(View arg0) {
- LinearLayout body = new LinearLayout(ActFmLoginActivity.this);
+ final LinearLayout body = new LinearLayout(ActFmLoginActivity.this);
body.setOrientation(LinearLayout.VERTICAL);
body.setPadding(10, 0, 10, 0);
final EditText name = addEditField(body, R.string.actfm_ALA_name_label);
- final ToggleButton toggle = new ToggleButton(ActFmLoginActivity.this);
- toggle.setTextOff(getString(R.string.actfm_ALA_pw_returning));
- toggle.setTextOn(getString(R.string.actfm_ALA_pw_new));
- toggle.setOnClickListener(new OnClickListener() {
+ final CheckBox toggle = new CheckBox(ActFmLoginActivity.this);
+ toggle.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
- public void onClick(View v) {
- name.setVisibility(toggle.isChecked() ? View.VISIBLE : View.GONE);
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ int nameIndex = body.indexOfChild(name);
+ int visibility = isChecked ? View.VISIBLE : View.GONE;
+ toggle.setText(isChecked ? R.string.actfm_ALA_pw_returning :
+ R.string.actfm_ALA_pw_new);
+ body.getChildAt(nameIndex - 1).setVisibility(visibility);
+ body.getChildAt(nameIndex).setVisibility(visibility);
}
});
+ toggle.setChecked(true);
body.addView(toggle, 0);
final EditText email = addEditField(body, R.string.actfm_ALA_email_label);
@@ -217,7 +223,7 @@ public class ActFmLoginActivity extends Activity implements AuthListener {
password.setTransformationMethod(new PasswordTransformationMethod());
new AlertDialog.Builder(ActFmLoginActivity.this)
- .setTitle(R.string.actfm_ALA_signup_title)
+ .setTitle(R.string.actfm_ALA_login_title)
.setView(body)
.setIcon(R.drawable.icon_32)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
diff --git a/astrid/res/values/strings-actfm.xml b/astrid/res/values/strings-actfm.xml
index 15e3b4eea..36833d324 100644
--- a/astrid/res/values/strings-actfm.xml
+++ b/astrid/res/values/strings-actfm.xml
@@ -150,11 +150,11 @@
Sign In Here
-
- New User
+
+ Create a new account?
-
- Returning
+
+ Already have an account?
Name
@@ -168,9 +168,6 @@
Password
-
- Create New Account
-
Login to Astrid.com