@LargeTest @Test public void touchLongPressUsingLongClickListener() throws Throwable { final DragStartListener listener = createListener(true); final DragStartHelper helper = createDragStartHelper(listener); mDragSource.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View view) { return helper.onLongClick(view); } }); sendTouchEvent(MotionEvent.ACTION_DOWN, mDragSource, 1, 2); waitForLongPress(); verify(listener, times(1)).onDragStart( eq(mDragSource), eq(helper), argThat(new TouchPositionMatcher(0, 0))); verifyNoMoreInteractions(listener); }
public boolean onLongClick(View v) { return mListener.onDragStart(v, this); }
DragStartHelper { public boolean onLongClick(View v) { return mListener.onDragStart(v, this); } }
DragStartHelper { public boolean onLongClick(View v) { return mListener.onDragStart(v, this); } DragStartHelper(View view, OnDragStartListener listener); }
DragStartHelper { public boolean onLongClick(View v) { return mListener.onDragStart(v, this); } 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 boolean onLongClick(View v) { return mListener.onDragStart(v, this); } DragStartHelper(View view, OnDragStartListener listener); void attach(); void detach(); boolean onTouch(View v, MotionEvent event); boolean onLongClick(View v); void getTouchPosition(Point point);  }