Beispiel #1
0
        /**
         * Closes the drawer with an animation.
         *
         * @see #close()
         * @see #open()
         * @see #animateOpen()
         * @see #animateToggle()
         * @see #toggle()
         */
        public void animateClose()
        {
            prepareContent();
            OnDrawerScrollListener scrollListener = mOnDrawerScrollListener;

            if (scrollListener != null)
            {
                scrollListener.onScrollStarted();
            }
            animateClose(mVertical ? mHandle.Top : mHandle.Left);

            if (scrollListener != null)
            {
                scrollListener.onScrollEnded();
            }
        }
Beispiel #2
0
        /**
         * Opens the drawer with an animation.
         *
         * @see #close()
         * @see #open()
         * @see #animateClose()
         * @see #animateToggle()
         * @see #toggle()
         */
        public void animateOpen()
        {
            prepareContent();
            OnDrawerScrollListener scrollListener = mOnDrawerScrollListener;

            if (scrollListener != null)
            {
                scrollListener.onScrollStarted();
            }
            animateOpen(mVertical ? mHandle.Top : mHandle.Left);

            SendAccessibilityEvent(Android.Views.Accessibility.EventTypes.WindowStateChanged);

            if (scrollListener != null)
            {
                scrollListener.onScrollEnded();
            }
        }
Beispiel #3
0
 /**
  * Sets the listener that receives a notification when the drawer starts or
  * ends a scroll. A fling is considered as a scroll. A fling will also
  * trigger a drawer opened or drawer closed event.
  *
  * @param onDrawerScrollListener
  *           The listener to be notified when scrolling starts or stops.
  */
 public void setOnDrawerScrollListener(OnDrawerScrollListener onDrawerScrollListener)
 {
     mOnDrawerScrollListener = onDrawerScrollListener;
 }
		/**
	 * Sets the listener that receives a notification when the drawer starts or
	 * ends a scroll. A fling is considered as a scroll. A fling will also
	 * trigger a drawer opened or drawer closed event.
	 * 
	 * @param onDrawerScrollListener
	 *           The listener to be notified when scrolling starts or stops.
	 */
		public void setOnDrawerScrollListener( OnDrawerScrollListener onDrawerScrollListener )
		{
			mOnDrawerScrollListener = onDrawerScrollListener;
		}