Example #1
0
        public override void OnShowCustomView(View view, ICustomViewCallback callback)
        {
            base.OnShowCustomView(view, callback);

            ((Activity)_context).VolumeControlStream = Stream.Music;

            _dailyMotionWebVideoView.IsFullScreen = true;
            _dailyMotionWebVideoView.ViewCallback = callback;

            var layout = view as FrameLayout;

            if (layout != null)
            {
                var frame = layout;
                var child = frame.FocusedChild as VideoView;
                if (child != null)
                {
                    //We are in 2.3
                    var video = child;
                    frame.RemoveView(video);

                    _dailyMotionWebVideoView.SetupVideoLayout(video);

                    _dailyMotionWebVideoView.CustomVideoView = video;
                    _dailyMotionWebVideoView.CustomVideoView.SetOnCompletionListener(this);
                }
                else
                {
                    //Handle 4.x
                    _dailyMotionWebVideoView.SetupVideoLayout(view);
                }
            }
        }
 public override void OnShowCustomView(Android.Views.View view, ICustomViewCallback callback)
 {
     customView            = view;
     view.LayoutParameters = matchParentLayout;
     parent.AddView(view);
     content.Visibility = ViewStates.Gone;
 }
 public override void OnShowCustomView(Android.Views.View view, ICustomViewCallback callback)
 {
     if (customView != null)
     {
         OnHideCustomView();
     }
     else
     {
         originalSystemUIVisibility = (Forms.Context as Activity).Window.DecorView.SystemUiVisibility;
         originalOrientation        = (Forms.Context as Activity).RequestedOrientation;
         customView   = view;
         viewCallback = callback;
         ((FrameLayout)(Forms.Context as Activity).Window.DecorView)
         .AddView(customView, new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MatchParent, FrameLayout.LayoutParams.MatchParent));
     }
 }
Example #4
0
            public void onShowCustomView(View view, ICustomViewCallback callback)
            {
                base.OnShowCustomView(view, callback);
                //如果view 已经存在,则隐藏
                if (mCustomView != null)
                {
                    callback.OnCustomViewHidden();
                    return;
                }

                mCustomView            = view;
                mCustomView.Visibility = ViewStates.Visible;
                mCustomViewCallback    = callback;
                mLayout.AddView(mCustomView);
                mLayout.Visibility = ViewStates.Visible;
                mLayout.BringToFront();

                ////设置横屏
                //setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
            }
 public override void OnShowCustomView(View view, ICustomViewCallback callback)
 {
     EnterFullScreenRequested?.Invoke(this, new EnterFullScreenRequestedEventArgs(view));
 }