protected void animateOffsetTo(int position, int duration) {
        final int startX = (int) mOffsetPixels;
        final int dx = position - startX;

        if (dx > 0) {
            setDrawerState(STATE_OPENING);
            mScroller.startScroll(startX, 0, dx, 0, duration);
        } else {
            setDrawerState(STATE_CLOSING);
            mScroller.startScroll(startX, 0, dx, 0, duration);
        }

        startLayerTranslation();

        postAnimationInvalidate();
    }
Moves the drawer to the position passed.

@param position The position the content is moved to.
@param velocity Optional velocity if called by releasing a drag event.
@param animate  Whether the move is animated.
menudrawer/src/net/simonvt/menudrawer/DraggableDrawer.java