diff options
author | Michael Kolb <kolby@google.com> | 2012-04-02 16:18:36 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2012-04-03 11:23:18 -0700 |
commit | 4923c22cb79296a9624a599cf8874323cdbc6cbc (patch) | |
tree | b7ab75efc152eea49609c583bbf225733d7513a6 /src/com/android/browser/PhoneUi.java | |
parent | d38135ceb6fa57d90d018851f09c7aaea09fd2a9 (diff) | |
download | packages_apps_browser-4923c22cb79296a9624a599cf8874323cdbc6cbc.zip packages_apps_browser-4923c22cb79296a9624a599cf8874323cdbc6cbc.tar.gz packages_apps_browser-4923c22cb79296a9624a599cf8874323cdbc6cbc.tar.bz2 |
Don't embed titlebar in WebView
Bug: 5032345
The titlebar gets attached to an overlay and tracks the scrolling
of the WebView at the top of the page.
Change-Id: I60b2163bb7a3642813823995278722455f566f36
Diffstat (limited to 'src/com/android/browser/PhoneUi.java')
-rw-r--r-- | src/com/android/browser/PhoneUi.java | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java index 5afb9c4..d02a3d2 100644 --- a/src/com/android/browser/PhoneUi.java +++ b/src/com/android/browser/PhoneUi.java @@ -124,7 +124,6 @@ public class PhoneUi extends BaseUi { if (!mOptionsMenuOpen || mExtendedMenuOpen) { if (mUseQuickControls && !mTitleBar.isEditingUrl()) { mTitleBar.setShowProgressOnly(true); - setTitleGravity(Gravity.TOP); } showTitleBar(); } @@ -167,11 +166,9 @@ public class PhoneUi extends BaseUi { // Request focus on the top window. if (mUseQuickControls) { mPieControl.forceToTop(mContentView); + view.setTitleBar(null); } else { - // check if title bar is already attached by animation - if (mTitleBar.getParent() == null) { - WebViewClassic.fromWebView(view).setEmbeddedTitleBar(mTitleBar); - } + view.setTitleBar(mTitleBar); } if (tab.isInVoiceSearchMode()) { showVoiceTitleBar(tab.getVoiceDisplayTitle(), tab.getVoiceSearchResults()); @@ -268,41 +265,16 @@ public class PhoneUi extends BaseUi { } @Override - protected void setTitleGravity(int gravity) { - if (mUseQuickControls) { - FrameLayout.LayoutParams lp = - (FrameLayout.LayoutParams) mTitleBar.getLayoutParams(); - lp.gravity = gravity; - mTitleBar.setLayoutParams(lp); - } else { - super.setTitleGravity(gravity); - } - } - - @Override public void setUseQuickControls(boolean useQuickControls) { mUseQuickControls = useQuickControls; mTitleBar.setUseQuickControls(mUseQuickControls); if (useQuickControls) { mPieControl = new PieControlPhone(mActivity, mUiController, this); mPieControl.attachToContainer(mContentView); - WebView web = getWebView(); - if (web != null) { - WebViewClassic.fromWebView(web).setEmbeddedTitleBar(null); - } } else { if (mPieControl != null) { mPieControl.removeFromContainer(mContentView); } - WebView web = getWebView(); - if (web != null) { - // make sure we can re-parent titlebar - if ((mTitleBar != null) && (mTitleBar.getParent() != null)) { - ((ViewGroup) mTitleBar.getParent()).removeView(mTitleBar); - } - WebViewClassic.fromWebView(web).setEmbeddedTitleBar(mTitleBar); - } - setTitleGravity(Gravity.NO_GRAVITY); } updateUrlBarAutoShowManagerTarget(); } |