Enable fullscreen support
Always allow the tab to go fullscreen. Explicit call to
exit fullscreen is added. Fullscreen layout logic moved
to base ui class.
Change-Id: I4474d90f99bf4753dedbe453b21f126668c40f64
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 1ea1460..0508e67 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -209,8 +209,7 @@
mUiController.hideCustomView();
return true;
} else if ((mTabControl.getCurrentTab() != null) &&
- (mTabControl.getCurrentTab().isTabFullScreen())) {
- mTabControl.getCurrentTab().setTabFullscreen(false);
+ (mTabControl.getCurrentTab().exitFullscreen())) {
return true;
}
return false;
@@ -811,6 +810,29 @@
win.setAttributes(winParams);
}
+ //make full screen bu showing/hiding topbar and system status bar
+ public void showFullscreen(boolean fullScreen) {
+ //Hide/show system ui bar as needed
+ if (!BrowserSettings.getInstance().useFullscreen())
+ setFullscreen(fullScreen);
+
+ //Hide/show topbar as needed
+ if (getWebView() != null) {
+ if (fullScreen) {
+ //hide topbar
+ getWebView().updateTopControls(true, false, false);
+ } else {
+ //show the topbar
+ getWebView().updateTopControls(false, true, true);
+ //enable for auto-hide
+ if (!mTitleBar.isFixed())
+ getWebView().updateTopControls(true, true, false);
+ }
+ }
+ }
+
+
+
public void translateTitleBar(float topControlsOffsetYPix) {
if (mTitleBar != null && !mInActionMode) {
mTitleBar.bringToFront();