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/XLargeUi.java | |
| parent | d38135ceb6fa57d90d018851f09c7aaea09fd2a9 (diff) | |
| download | packages_apps_Browser-4923c22cb79296a9624a599cf8874323cdbc6cbc.tar.gz packages_apps_Browser-4923c22cb79296a9624a599cf8874323cdbc6cbc.tar.bz2 packages_apps_Browser-4923c22cb79296a9624a599cf8874323cdbc6cbc.zip | |
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/XLargeUi.java')
| -rw-r--r-- | src/com/android/browser/XLargeUi.java | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java index 46149aace..6e37c1533 100644 --- a/src/com/android/browser/XLargeUi.java +++ b/src/com/android/browser/XLargeUi.java @@ -28,13 +28,9 @@ import android.os.Bundle; import android.os.Handler; import android.util.Log; import android.view.ActionMode; -import android.view.Gravity; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; -import android.view.View; -import android.view.ViewGroup; -import android.webkit.WebChromeClient.CustomViewCallback; import android.webkit.WebView; import android.webkit.WebViewClassic; @@ -92,25 +88,11 @@ public class XLargeUi extends BaseUi { checkTabCount(); mPieControl = new PieControlXLarge(mActivity, mUiController, this); mPieControl.attachToContainer(mContentView); - WebView web = getWebView(); - if (web != null) { - WebViewClassic.fromWebView(web).setEmbeddedTitleBar(null); - - } } else { mActivity.getActionBar().show(); if (mPieControl != null) { mPieControl.removeFromContainer(mContentView); } - WebView web = getWebView(); - if (web != null) { - if (mTitleBar.getParent() != null) { - ViewGroup p = (ViewGroup) mTitleBar.getParent(); - p.removeView(mTitleBar); - } - WebViewClassic.fromWebView(web).setEmbeddedTitleBar(mTitleBar); - } - setTitleGravity(Gravity.NO_GRAVITY); } mTabBar.setUseQuickControls(mUseQuickControls); // We need to update the tabs with this change @@ -200,11 +182,9 @@ public class XLargeUi 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); } mTabBar.onSetActiveTab(tab); if (tab.isInVoiceSearchMode()) { @@ -269,13 +249,6 @@ public class XLargeUi extends BaseUi { } } - @Override - protected void setTitleGravity(int gravity) { - if (!mUseQuickControls) { - super.setTitleGravity(gravity); - } - } - // action mode callbacks @Override |
