diff options
author | Michael Kolb <kolby@google.com> | 2011-02-23 16:13:24 -0800 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-02-23 17:03:38 -0800 |
commit | 29ccf8a32bf65a5512191d3633353132bb2cd88b (patch) | |
tree | 87a20aded77d8c2c3b4be6ce25c73f9f6f91302f | |
parent | 17e78fd06905d090cfab4c4f7313bd4b3eec5473 (diff) | |
download | packages_apps_Browser-29ccf8a32bf65a5512191d3633353132bb2cd88b.zip packages_apps_Browser-29ccf8a32bf65a5512191d3633353132bb2cd88b.tar.gz packages_apps_Browser-29ccf8a32bf65a5512191d3633353132bb2cd88b.tar.bz2 |
use title height without progress bar
Bug: 3473996
let the titlebar decide how high it is
work around View.getHeight being final
depends on I6e9a85d88eba176886e53b260d02082d26b410d8
Change-Id: I87a1acbddbb71637979491c40858a3ee22a230b5
-rw-r--r-- | src/com/android/browser/ScrollWebView.java | 7 | ||||
-rw-r--r-- | src/com/android/browser/TitleBarBase.java | 4 | ||||
-rw-r--r-- | src/com/android/browser/TitleBarXLarge.java | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/browser/ScrollWebView.java b/src/com/android/browser/ScrollWebView.java index 1d7f23a..2bf07e1 100644 --- a/src/com/android/browser/ScrollWebView.java +++ b/src/com/android/browser/ScrollWebView.java @@ -33,6 +33,7 @@ public class ScrollWebView extends WebView implements Runnable { private boolean mIsCancelled; private boolean mBackgroundRemoved = false; private boolean mUserInitiated = false; + private TitleBarBase mTitleBar; /** * @param context @@ -70,6 +71,11 @@ public class ScrollWebView extends WebView implements Runnable { super(context); } + @Override + protected int getTitleHeight() { + return (mTitleBar != null) ? mTitleBar.getEmbeddedHeight() : 0; + } + // scroll runnable implementation public void run() { if (!mIsCancelled && (mScrollListener != null)) { @@ -84,6 +90,7 @@ public class ScrollWebView extends WebView implements Runnable { @Override public void setEmbeddedTitleBar(final View title) { super.setEmbeddedTitleBar(title); + mTitleBar = (TitleBarBase) title; if (title != null && mScrollListener != null) { // allow the scroll listener to initialize its state post(this); diff --git a/src/com/android/browser/TitleBarBase.java b/src/com/android/browser/TitleBarBase.java index 2b64aa3..46136db 100644 --- a/src/com/android/browser/TitleBarBase.java +++ b/src/com/android/browser/TitleBarBase.java @@ -113,6 +113,10 @@ public class TitleBarBase extends LinearLayout implements UrlInputListener { } } + public int getEmbeddedHeight() { + return getHeight(); + } + // UrlInputListener implementation /** diff --git a/src/com/android/browser/TitleBarXLarge.java b/src/com/android/browser/TitleBarXLarge.java index c732da8..1c44f81 100644 --- a/src/com/android/browser/TitleBarXLarge.java +++ b/src/com/android/browser/TitleBarXLarge.java @@ -163,6 +163,11 @@ public class TitleBarXLarge extends TitleBarBase } } + @Override + public int getEmbeddedHeight() { + return mContainer.getHeight(); + } + void setUseQuickControls(boolean useQuickControls) { mUseQuickControls = useQuickControls; mUrlInput.setUseQuickControls(mUseQuickControls); |