@Override public boolean onTouchEvent(MotionEvent event) { if (mClickListener != null && isEnabled()) { Label label = (Label) getTag(R.id.fab_label); if (label == null) return super.onTouchEvent(event); int action = event.getAction(); switch (action) { case MotionEvent.ACTION_UP: if (label != null) { label.onActionUp(); } onActionUp(); break; case MotionEvent.ACTION_CANCEL: if (label != null) { label.onActionUp(); } onActionUp(); break; } mGestureDetector.onTouchEvent(event); } return super.onTouchEvent(event); }
@Override public boolean onSingleTapUp(MotionEvent e) { Label label = (Label) getTag(R.id.fab_label); if (label != null) { label.onActionUp(); } onActionUp(); return super.onSingleTapUp(e); }