summaryrefslogtreecommitdiff
path: root/src/com/android/browser/HttpAuthenticationDialog.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser/HttpAuthenticationDialog.java')
-rw-r--r--src/com/android/browser/HttpAuthenticationDialog.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/browser/HttpAuthenticationDialog.java b/src/com/android/browser/HttpAuthenticationDialog.java
index a9ba332e..ac4119c0 100644
--- a/src/com/android/browser/HttpAuthenticationDialog.java
+++ b/src/com/android/browser/HttpAuthenticationDialog.java
@@ -18,10 +18,13 @@ package com.android.browser;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
+import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
+import android.view.inputmethod.EditorInfo;
import android.widget.TextView;
+import android.widget.TextView.OnEditorActionListener;
/**
* HTTP authentication dialog.
@@ -109,6 +112,16 @@ public class HttpAuthenticationDialog {
View v = factory.inflate(R.layout.http_authentication, null);
mUsernameView = (TextView) v.findViewById(R.id.username_edit);
mPasswordView = (TextView) v.findViewById(R.id.password_edit);
+ mPasswordView.setOnEditorActionListener(new OnEditorActionListener() {
+ @Override
+ public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+ if (actionId == EditorInfo.IME_ACTION_DONE) {
+ mDialog.getButton(AlertDialog.BUTTON_POSITIVE).performClick();
+ return true;
+ }
+ return false;
+ }
+ });
String title = mContext.getText(R.string.sign_in_to).toString().replace(
"%s1", mHost).replace("%s2", mRealm);