@Override public boolean onInterceptTouchEvent(final MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN) { parent.animateClose(); } return super.onInterceptTouchEvent(ev); }
public void toggle() { if (isOpened()) { animateOpen(); } else { animateClose(); } }