diff options
author | Michael Kolb <kolby@google.com> | 2011-08-02 13:06:43 -0700 |
---|---|---|
committer | Michael Kolb <kolby@google.com> | 2011-08-02 13:06:47 -0700 |
commit | 52051eb9ec50f0d7375557996fc3b44c3896e5a1 (patch) | |
tree | 0e27423dae0b0b7ff0b93b133434d9e3ba9fc24b /src/com/android/browser/XLargeUi.java | |
parent | bd4c00a61a44637e04efeb837da490a2b51b11c1 (diff) | |
download | packages_apps_Browser-52051eb9ec50f0d7375557996fc3b44c3896e5a1.zip packages_apps_Browser-52051eb9ec50f0d7375557996fc3b44c3896e5a1.tar.gz packages_apps_Browser-52051eb9ec50f0d7375557996fc3b44c3896e5a1.tar.bz2 |
make sure titlebar can be attached
Bug: 5110201
remove title bar from parent if it already has a parent
Change-Id: I9616605004da70b8162ae5bc19a40c1c0418dc55
Diffstat (limited to 'src/com/android/browser/XLargeUi.java')
-rw-r--r-- | src/com/android/browser/XLargeUi.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java index 301e09f..5c11b58 100644 --- a/src/com/android/browser/XLargeUi.java +++ b/src/com/android/browser/XLargeUi.java @@ -25,6 +25,7 @@ import android.view.ActionMode; import android.view.Gravity; import android.view.KeyEvent; import android.view.View; +import android.view.ViewGroup; import android.webkit.WebChromeClient.CustomViewCallback; import android.webkit.WebView; @@ -94,6 +95,10 @@ public class XLargeUi extends BaseUi { } WebView web = getWebView(); if (web != null) { + if (mTitleBar.getParent() != null) { + ViewGroup p = (ViewGroup) mTitleBar.getParent(); + p.removeView(mTitleBar); + } web.setEmbeddedTitleBar(mTitleBar); // show url bar on scrolling web.setOnTouchListener(this); |