コード例 #1
0
 public void OpenMenu()
 {
     if (!SwipEnable)
     {
         return;
     }
     if (state == SwipeMenuLayoutState.Close)
     {
         state = SwipeMenuLayoutState.Open;
         Swipe(MenuView.Width * (int)mSwipeDirection);
     }
 }
コード例 #2
0
 public void CloseMenu()
 {
     if (mCloseScroller.ComputeScrollOffset())
     {
         mCloseScroller.AbortAnimation();
     }
     if (state == SwipeMenuLayoutState.Open)
     {
         state = SwipeMenuLayoutState.Close;
         Swipe(0);
     }
 }
コード例 #3
0
 public void SmoothCloseMenu()
 {
     state = SwipeMenuLayoutState.Close;
     if (mSwipeDirection == SwipeDirection.Left)
     {
         mBaseX = -ContentView.Left;
         mCloseScroller.StartScroll(0, 0, MenuView.Width, 0, 350);
     }
     else
     {
         mBaseX = MenuView.Right;
         mCloseScroller.StartScroll(0, 0, MenuView.Width, 0, 350);
     }
     PostInvalidate();
 }
コード例 #4
0
 public void SmoothOpenMenu()
 {
     if (!SwipEnable)
     {
         return;
     }
     state = SwipeMenuLayoutState.Open;
     if (mSwipeDirection == SwipeDirection.Left)
     {
         mOpenScroller.StartScroll(-ContentView.Left, 0, MenuView.Width, 0, 350);
     }
     else
     {
         mOpenScroller.StartScroll(ContentView.Left, 0, MenuView.Width, 0, 350);
     }
     PostInvalidate();
 }