protected override void OnElementChanged(ElementChangedEventArgs <GSYPlayerControlView> e)
        {
            base.OnElementChanged(e);
            if (e.OldElement == null)
            {
                if (Control == null)
                {
                    player = new StandardGSYVideoPlayer(context);
                    var activity = (Activity)base.Context;

                    orientationUtils = new OrientationUtils(activity, player);
                    player.SetThumbPlay(true);

                    InitializePlayer(e.NewElement.Source, e.NewElement.AutoPlay, e.NewElement.Thumbnail, e.NewElement.Title);

                    SetNativeControl(player);

                    player.BackButton.Click += (sender, e) =>
                    {
                        try
                        {
                            player.SetUp("", true, "");
                            player.OnBackFullscreen();
                            activity.OnBackPressed();
                        }
                        catch (Exception ex)
                        {
                        }
                    };
                    player.FullscreenButton.Click += (sender, e) =>
                    {
                        try
                        {
                            if (!fullscreen)
                            {
                                fullscreen = true;
                                activity.Window.AddFlags(WindowManagerFlags.Fullscreen);

                                //var uiOptions = SystemUiFlags.HideNavigation | SystemUiFlags.ImmersiveSticky | SystemUiFlags.Fullscreen | SystemUiFlags.LayoutFullscreen | SystemUiFlags.LayoutHideNavigation;
                                // activity.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)uiOptions;
                            }
                            else
                            {
                                fullscreen = false;
                                activity.Window.ClearFlags(WindowManagerFlags.Fullscreen);
                                //activity.Window.DecorView.SystemUiVisibility = (StatusBarVisibility)(SystemUiFlags.LayoutFullscreen | SystemUiFlags.LayoutHideNavigation);
                            }
                            orientationUtils.ResolveByClick();
                            player.StartWindowFullscreen(context, true, true);
                        }
                        catch (Exception ex)
                        {
                        }
                    };
                    mainpage = ((ViewGroup)player.Parent);
                }
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                SetContentView(Resource.Layout.activity_scrolling);

                appBarStateChangeListener = new IAppBarStateChangeListener();
                context = this;// this.BaseContext;
                initView();

                string url = "http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4";

                //增加封面
                ImageView imageView = new ImageView(this);
                imageView.SetScaleType(ImageView.ScaleType.CenterCrop);

                ResolveNormalVideoUI();

                //外部辅助的旋转,帮助全屏
                orientationUtils = new OrientationUtils(this, detailPlayer);
                //初始化不打开外部的旋转
                orientationUtils.Enable = false;//.setEnable(false);

                GSYVideoOptionBuilder gsyVideoOption = new GSYVideoOptionBuilder();
                gsyVideoOption.SetThumbImageView(imageView)
                .SetIsTouchWiget(true)
                .SetRotateViewAuto(false)
                .SetLockLand(false)
                .SetShowFullAnimation(false)
                .SetNeedLockFull(true)
                .SetSeekRatio(1)
                .SetUrl(url)
                .SetCacheWithPlay(false)
                .SetVideoTitle("测试视频")
                .SetVideoAllCallBack(new IGSYSampleCallBack())
                .SetLockClickListener(this)
                .SetGSYVideoProgressListener(this)
                .Build(detailPlayer);

                detailPlayer.FullscreenButton.Click += (sender, e) =>
                {
                    //直接横屏
                    orientationUtils.ResolveByClick();

                    //第一个true是否需要隐藏actionbar,第二个true是否需要隐藏statusbar
                    detailPlayer.StartWindowFullscreen(this, true, true);
                };
            }
            catch (Java.Lang.Exception ex)
            {
                Log.Error("", ex.ToString());
            }

            //detailPlayer..setLinkScroll(true);
        }