public void toggleMenu(boolean animate) {
        if (mDrawerState == STATE_OPEN || mDrawerState == STATE_OPENING) {
            closeMenu(animate);
        } else if (mDrawerState == STATE_CLOSED || mDrawerState == STATE_CLOSING) {
            openMenu(animate);
        }
    }
Indicates whether the current layer type is {@link android.view.View#LAYER_TYPE_HARDWARE}.
menudrawer/src/net/simonvt/menudrawer/DraggableDrawer.java