public IScreenShotable OnSwitch(IResourceble p0, IScreenShotable p1, int p2)
        {
            switch (p0.Name)
            {
            case ContentFragment.CLOSE:
                return(p1);

            default:
                return(ReplaceFragment(p1, p2));
            }
        }
Beispiel #2
0
 public IScreenShotable OnSwitch(IResourceble slideMenuItem, IScreenShotable screenShotable, int position)
 {
     if (slideMenuItem.Name == ContentFragment.CLOSE)
     {
         return(screenShotable);
     }
     else
     {
         return(ReplaceFragment(screenShotable, position));
     }
 }
        public IScreenShotable ReplaceFragment(IScreenShotable screenShotable, int topPosition)
        {
            this.res = this.res == Resource.Drawable.content_music ? Resource.Drawable.content_films : Resource.Drawable.content_music;
            View            view        = FindViewById(Resource.Id.content_frame);
            int             finalRadius = Math.Max(view.Width, view.Height);
            SupportAnimator animator    = IO.Codetail.Animation.ViewAnimationUtils.CreateCircularReveal(view, 0, topPosition, 0, finalRadius);

            animator.SetInterpolator(new AccelerateInterpolator());
            animator.SetDuration(Yalantis.Com.Sidemenu.Util.ViewAnimator.CircularRevealAnimationDuration);

            FindViewById(Resource.Id.content_overlay).SetBackgroundDrawable(new BitmapDrawable(Resources, screenShotable.Bitmap));
            animator.Start();
            ContentFragment contentFragment = ContentFragment.NewInstance(this.res);

            SupportFragmentManager.BeginTransaction().Replace(Resource.Id.content_frame, contentFragment).Commit();
            return(contentFragment);
        }