@SmallTest @Test public void mousePressWithSecondaryButton() throws Throwable { final DragStartListener listener = createListener(true); final DragStartHelper helper = createDragStartHelper(listener); helper.attach(); sendMouseEvent(MotionEvent.ACTION_DOWN, MotionEvent.BUTTON_PRIMARY, mDragSource, 0, 0); sendMouseEvent(MotionEvent.ACTION_MOVE, MotionEvent.BUTTON_PRIMARY | MotionEvent.BUTTON_SECONDARY, mDragSource, 0, 0); sendMouseEvent(MotionEvent.ACTION_MOVE, MotionEvent.BUTTON_PRIMARY, mDragSource, 0, 0); verifyNoMoreInteractions(listener); }
public void attach() { mView.setOnLongClickListener(mLongClickListener); mView.setOnTouchListener(mTouchListener); }
DragStartHelper { public void attach() { mView.setOnLongClickListener(mLongClickListener); mView.setOnTouchListener(mTouchListener); } }
DragStartHelper { public void attach() { mView.setOnLongClickListener(mLongClickListener); mView.setOnTouchListener(mTouchListener); } DragStartHelper(View view, OnDragStartListener listener); }
DragStartHelper { public void attach() { mView.setOnLongClickListener(mLongClickListener); mView.setOnTouchListener(mTouchListener); } DragStartHelper(View view, OnDragStartListener listener); void attach(); void detach(); boolean onTouch(View v, MotionEvent event); boolean onLongClick(View v); void getTouchPosition(Point point); }
DragStartHelper { public void attach() { mView.setOnLongClickListener(mLongClickListener); mView.setOnTouchListener(mTouchListener); } DragStartHelper(View view, OnDragStartListener listener); void attach(); void detach(); boolean onTouch(View v, MotionEvent event); boolean onLongClick(View v); void getTouchPosition(Point point);  }