XFAndroidFullScreenWebView icon indicating copy to clipboard operation
XFAndroidFullScreenWebView copied to clipboard

Hiding top bar

Open alex100915 opened this issue 5 years ago • 2 comments

Hello Friends

I want to hide that bar on the top. Could it be done?

image

alex100915 avatar Jan 18 '21 18:01 alex100915

On FullScreenEnabledWebViewRenderer.cs

`private void OnEnterFullscreenRequested( object sender, EnterFullScreenRequestedEventArgs eventArgs) { if (_webView.EnterFullScreenCommand != null && _webView.EnterFullScreenCommand.CanExecute(null)) { _webView.EnterFullScreenCommand.Execute(eventArgs.View.ToView());

            var activity = Context.GetActivity();

            int uiOptions = (int)activity.Window.DecorView.SystemUiVisibility;

            uiOptions |= (int)SystemUiFlags.LowProfile;
            uiOptions |= (int)SystemUiFlags.Fullscreen;
            uiOptions |= (int)SystemUiFlags.HideNavigation;
            uiOptions |= (int)SystemUiFlags.ImmersiveSticky;

            activity.Window.DecorView.SystemUiVisibility =
             (StatusBarVisibility)uiOptions;
        }
    }`

alex100915 avatar Jan 18 '21 20:01 alex100915

and this is how to restore them

activity.Window.DecorView.SystemUiVisibility = StatusBarVisibility.Visible;

mhrastegari avatar May 02 '21 14:05 mhrastegari