summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/LogInDialog.java
diff options
context:
space:
mode:
authorSean Leonard <meanderingcode@aetherislands.net>2013-08-13 09:28:13 -0600
committerSean Leonard <meanderingcode@aetherislands.net>2013-08-13 09:28:13 -0600
commit2dc51029679b04599c16ec728404ef2442e35510 (patch)
tree56e400bc805ba6f91aeb52b059d4fa7f9f4cca22 /src/se/leap/leapclient/LogInDialog.java
parenta383161777a94eedb3911bfca1f0d79cf2eba81f (diff)
parentde28df6f62949e6142f8bc1b5363137906a6d7a3 (diff)
Merge branch 'feature/retry-login-retain-username' into develop
Diffstat (limited to 'src/se/leap/leapclient/LogInDialog.java')
-rw-r--r--src/se/leap/leapclient/LogInDialog.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/se/leap/leapclient/LogInDialog.java b/src/se/leap/leapclient/LogInDialog.java
index 8b3f9e80..8e8bb65a 100644
--- a/src/se/leap/leapclient/LogInDialog.java
+++ b/src/se/leap/leapclient/LogInDialog.java
@@ -48,8 +48,16 @@ public class LogInDialog extends DialogFragment {
if(getArguments() != null && getArguments().containsKey(getResources().getString(R.string.user_message))) {
user_message.setText(getArguments().getString(getResources().getString(R.string.user_message)));
} else user_message.setVisibility(View.GONE);
+
final EditText username_field = (EditText)log_in_dialog_view.findViewById(R.id.username_entered);
+ if(getArguments() != null && getArguments().containsKey(getResources().getString(R.string.user_message))) {
+ String username = getArguments().getString(ConfigHelper.USERNAME_KEY);
+ username_field.setText(username);
+ username_field.setHint("");
+ }
final EditText password_field = (EditText)log_in_dialog_view.findViewById(R.id.password_entered);
+ if(!username_field.getText().toString().isEmpty() && password_field.isFocusable())
+ password_field.requestFocus();
builder.setView(log_in_dialog_view)
.setPositiveButton(R.string.login_button, new DialogInterface.OnClickListener() {