From 718a24d6c9671fe2da4112a3b5f30fd3939b38e8 Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 12 Aug 2011 11:08:30 -0700 Subject: URL Bar auto show tweaks Bug: 5144824 Bug: 5142398 Change-Id: I235828d52bc8d8c35e2b625d767caeffb2d9b654 --- src/com/android/browser/BaseUi.java | 58 +++------ src/com/android/browser/BrowserWebView.java | 19 ++- src/com/android/browser/PhoneUi.java | 6 +- src/com/android/browser/UrlBarAutoShowManager.java | 129 +++++++++++++++++++++ src/com/android/browser/XLargeUi.java | 5 +- 5 files changed, 163 insertions(+), 54 deletions(-) create mode 100644 src/com/android/browser/UrlBarAutoShowManager.java diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java index 368021a..a52bc56 100644 --- a/src/com/android/browser/BaseUi.java +++ b/src/com/android/browser/BaseUi.java @@ -36,11 +36,8 @@ import android.view.Gravity; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; -import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; -import android.view.View.OnTouchListener; -import android.view.ViewConfiguration; import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.view.WindowManager; @@ -60,7 +57,7 @@ import java.util.List; /** * UI interface definitions */ -public abstract class BaseUi implements UI, OnTouchListener { +public abstract class BaseUi implements UI { private static final String LOGTAG = "BaseUi"; @@ -97,10 +94,9 @@ public abstract class BaseUi implements UI, OnTouchListener { private LinearLayout mErrorConsoleContainer = null; - private Toast mStopToast; + private UrlBarAutoShowManager mUrlBarAutoShowManager; - private float mInitialY; - private int mTitlebarScrollTriggerSlop; + private Toast mStopToast; // the default