From 42c0c063206ed37ab63b887348369650b51942e9 Mon Sep 17 00:00:00 2001 From: Michael Kolb Date: Tue, 2 Aug 2011 12:56:06 -0700 Subject: fix url action mode Bug: 5093025 The url bar is kept visible now It's still not perfect, because the url bar gets pushed down under the user's finger Change-Id: I7142cd1f442bf7e3b53af5aac150defda68661ed --- src/com/android/browser/Controller.java | 2 +- src/com/android/browser/PhoneUi.java | 4 +++- src/com/android/browser/UI.java | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index f20968b..0d22af0 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -1812,7 +1812,7 @@ public class Controller void onActionModeStarted(ActionMode mode) { mUi.onActionModeStarted(mode); mActionMode = mode; - if (mSimulateActionBarOverlayMode) { + if (mSimulateActionBarOverlayMode && !mUi.isEditingUrl()) { WebView web = getCurrentWebView(); // Simulate overlay mode by scrolling the webview the amount it will be // pushed down. Actual overlay mode doesn't work for us as otherwise diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index 901f5bd..32bc092 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -213,7 +213,9 @@ public class PhoneUi extends BaseUi { @Override public void onActionModeStarted(ActionMode mode) { - hideTitleBar(); + if (!isEditingUrl()) { + hideTitleBar(); + } } @Override diff --git a/src/com/android/browser/UI.java b/src/com/android/browser/UI.java index bc4c0cf..0929c0c 100644 --- a/src/com/android/browser/UI.java +++ b/src/com/android/browser/UI.java @@ -134,6 +134,8 @@ public interface UI { void editUrl(boolean clearInput); + boolean isEditingUrl(); + boolean dispatchKey(int code, KeyEvent event); public static interface DropdownChangeListener { -- cgit v1.1