public override void OnShowCustomView(Android.Views.View view, WebChromeClient.ICustomViewCallback callback) { base.OnShowCustomView(view, callback); if (mCustomView != null) { callback.OnCustomViewHidden(); return; } var v = urls; Intent inte = new Intent(Xamarin.Forms.Forms.Context, typeof(activity)); inte.PutExtra("url", v); Xamarin.Forms.Forms.Context.StartActivity(inte); FrameLayout frameLayout = (FrameLayout)view; var focusedChild = frameLayout.FocusedChild; //WebView.Visibility = ViewStates.Gone; customViewContainer.Visibility = ViewStates.Visible; //customViewContainer.AddView(view); //customViewCallback = callback; //customViewContainer.RefreshDrawableState(); //customViewContainer.BringToFront(); }
public override void OnHideCustomView() { base.OnHideCustomView(); ((FrameLayout)(Forms.Context as Activity).Window.DecorView).RemoveView(customView); customView = null; (Forms.Context as Activity).Window.DecorView.SystemUiVisibility = originalSystemUIVisibility; (Forms.Context as Activity).RequestedOrientation = originalOrientation; viewCallback?.OnCustomViewHidden(); viewCallback = null; }
public override void OnHideCustomView() { base.OnHideCustomView(); (((FrameLayout)_docView.Window.DecorView)).RemoveView(_customView); _customView = null; _docView.Window.DecorView.SystemUiVisibility = _originalSystemUiVisibility; _docView.RequestedOrientation = _originalOrientation; _customViewCallback.OnCustomViewHidden(); _customViewCallback = null; }
public void hideVideoView() { if (isFullscreen()) { if (mCustomVideoView != null) { mCustomVideoView.StopPlayback(); } mRootLayout.RemoveView(mVideoLayout); mViewCallback.OnCustomViewHidden(); ((Activity)Context).VolumeControlStream = (Stream)AudioManager.UseDefaultStreamType; mIsFullscreen = false; } }