コード例 #1
0
            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();
            }
コード例 #2
0
 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;
 }
コード例 #3
0
            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;
            }
コード例 #4
0
 public void hideVideoView()
 {
     if (isFullscreen())
     {
         if (mCustomVideoView != null)
         {
             mCustomVideoView.StopPlayback();
         }
         mRootLayout.RemoveView(mVideoLayout);
         mViewCallback.OnCustomViewHidden();
         ((Activity)Context).VolumeControlStream = (Stream)AudioManager.UseDefaultStreamType;
         mIsFullscreen = false;
     }
 }