summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/UrlInputView.java
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-02-03 17:54:40 -0800
committerMichael Kolb <kolby@google.com>2011-02-11 15:32:03 -0800
commit7cdc4906fc5852297a9a254c3251ad2f4dead6ee (patch)
treebdfa62eaad0c01cb8fa861f9ccfbb0ff5453073b /src/com/android/browser/UrlInputView.java
parent203d3806c45420c45e53c6b9f3d503a21bb9717e (diff)
downloadpackages_apps_Browser-7cdc4906fc5852297a9a254c3251ad2f4dead6ee.zip
packages_apps_Browser-7cdc4906fc5852297a9a254c3251ad2f4dead6ee.tar.gz
packages_apps_Browser-7cdc4906fc5852297a9a254c3251ad2f4dead6ee.tar.bz2
Remove second url bar
Remove the overlay "fake" titlebar by telling the WebView where to render the embedded titlebar Simplify focus handling requires Ic979b641c8cc80acb83eeab49c4f700fc5c50e72 in frameworks/base Change-Id: I7896cd731949fdcc47cd18abfee5ef947b0e8cee
Diffstat (limited to 'src/com/android/browser/UrlInputView.java')
-rw-r--r--src/com/android/browser/UrlInputView.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/com/android/browser/UrlInputView.java b/src/com/android/browser/UrlInputView.java
index 23e412d..6817b36 100644
--- a/src/com/android/browser/UrlInputView.java
+++ b/src/com/android/browser/UrlInputView.java
@@ -166,16 +166,14 @@ public class UrlInputView extends AutoCompleteTextView
performFiltering(getText().toString(), 0);
showDropDown();
}
+ } else {
+ finishInput(null, null, null);
}
if (mWrappedFocusListener != null) {
mWrappedFocusListener.onFocusChange(v, hasFocus);
}
}
- void stopEditing() {
- finishInput(null, null, null);
- }
-
public void setUrlInputListener(UrlInputListener listener) {
mListener = listener;
}
@@ -221,7 +219,7 @@ public class UrlInputView extends AutoCompleteTextView
@Override
public void onSearch(String search) {
- mListener.onEdit(search);
+ mListener.onCopySuggestion(search);
}
@Override
@@ -232,9 +230,10 @@ public class UrlInputView extends AutoCompleteTextView
@Override
public boolean onKeyPreIme(int keyCode, KeyEvent evt) {
- if (keyCode == KeyEvent.KEYCODE_BACK) {
+ if ((evt.getAction() == KeyEvent.ACTION_DOWN)
+ && (keyCode == KeyEvent.KEYCODE_BACK)) {
// catch back key in order to do slightly more cleanup than usual
- finishInput(null, null, null);
+ clearFocus();
return true;
}
return super.onKeyPreIme(keyCode, evt);
@@ -254,7 +253,7 @@ public class UrlInputView extends AutoCompleteTextView
public void onAction(String text, String extra, String source);
- public void onEdit(String text);
+ public void onCopySuggestion(String text);
}