summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/XLargeUi.java
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-08-02 13:06:43 -0700
committerMichael Kolb <kolby@google.com>2011-08-02 13:06:47 -0700
commit52051eb9ec50f0d7375557996fc3b44c3896e5a1 (patch)
tree0e27423dae0b0b7ff0b93b133434d9e3ba9fc24b /src/com/android/browser/XLargeUi.java
parentbd4c00a61a44637e04efeb837da490a2b51b11c1 (diff)
downloadandroid_packages_apps_Gello-52051eb9ec50f0d7375557996fc3b44c3896e5a1.tar.gz
android_packages_apps_Gello-52051eb9ec50f0d7375557996fc3b44c3896e5a1.tar.bz2
android_packages_apps_Gello-52051eb9ec50f0d7375557996fc3b44c3896e5a1.zip
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.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java
index 301e09f4..5c11b588 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);