@Test public void columnDragging_whenDraggingItem_whenItemPositionChanges_callsOnDragItemChangedPosition() { int firstItemPosition = 3; BoardView.BoardListener boardListener = mock(BoardView.BoardListener.class); subject.setBoardListener(boardListener); DragItemRecyclerView column = createColumnsAndDrag(adapter); reset(boardListener); when(adapter.getPositionForItemId(firstItemId)).thenReturn(firstItemPosition); column.onDragging(0, 0); verify(boardListener).onItemChangedPosition(0, 0, 0, firstItemPosition); }
public void setBoardListener(BoardListener listener) { mBoardListener = listener; }
BoardView extends HorizontalScrollView implements AutoScroller.AutoScrollListener { public void setBoardListener(BoardListener listener) { mBoardListener = listener; } }
BoardView extends HorizontalScrollView implements AutoScroller.AutoScrollListener { public void setBoardListener(BoardListener listener) { mBoardListener = listener; } BoardView(Context context);  BoardView(Context context, AttributeSet attrs);  BoardView(Context context, AttributeSet attrs, int defStyleAttr); }
BoardView extends HorizontalScrollView implements AutoScroller.AutoScrollListener { public void setBoardListener(BoardListener listener) { mBoardListener = listener; } BoardView(Context context);  BoardView(Context context, AttributeSet attrs);  BoardView(Context context, AttributeSet attrs, int defStyleAttr); @Override boolean onInterceptTouchEvent(MotionEvent event); @Override boolean onTouchEvent(MotionEvent event); @Override void computeScroll(); @Override void onAutoScrollPositionBy(int dx, int dy); @Override void onAutoScrollColumnBy(int columns); RecyclerView getRecyclerView(int column); DragItemAdapter getAdapter(int column); int getItemCount(); int getItemCount(int column); int getColumnCount(); View getHeaderView(int column); View getFooterView(int column); int getColumnOfHeader(View header); int getColumnOfFooter(View footer); void removeItem(int column, int row); void addItem(int column, int row, Object item, boolean scrollToItem); void moveItem(int fromColumn, int fromRow, int toColumn, int toRow, boolean scrollToItem); void moveItem(long itemId, int toColumn, int toRow, boolean scrollToItem); void replaceItem(int column, int row, Object item, boolean scrollToItem); void scrollToItem(int column, int row, boolean animate); void scrollToColumn(int column, boolean animate); void clearBoard(); void removeColumn(int column); boolean isDragEnabled(); void setDragEnabled(boolean enabled); int getFocusedColumn(); void setColumnWidth(int width); void setColumnSpacing(int columnSpacing); void setBoardEdge(int boardEdge); void setSnapToColumnsWhenScrolling(boolean snapToColumn); void setSnapToColumnWhenDragging(boolean snapToColumn); void setSnapToColumnInLandscape(boolean snapToColumnInLandscape); void setColumnSnapPosition(ColumnSnapPosition snapPosition); void setSnapDragItemToTouch(boolean snapToTouch); void setBoardListener(BoardListener listener); void setBoardCallback(BoardCallback callback); void setCustomDragItem(DragItem dragItem); void setCustomColumnDragItem(DragItem dragItem); DragItemRecyclerView insertColumn(final DragItemAdapter adapter, int index, final @Nullable View header, @Nullable View columnDragView, boolean hasFixedItemSize); DragItemRecyclerView insertColumn(final DragItemAdapter adapter, int index, final @Nullable View header, @Nullable View columnDragView, boolean hasFixedItemSize, @NonNull RecyclerView.LayoutManager layoutManager); void insertColumn(int index, @NonNull ColumnProperties columnProperties); DragItemRecyclerView addColumn(final DragItemAdapter adapter, final @Nullable View header, @Nullable View columnDragView, boolean hasFixedItemSize); DragItemRecyclerView addColumn(final DragItemAdapter adapter, final @Nullable View header, @Nullable View columnDragView, boolean hasFixedItemSize, @NonNull RecyclerView.LayoutManager layoutManager); void addColumn(@NonNull ColumnProperties columnProperties); }
BoardView extends HorizontalScrollView implements AutoScroller.AutoScrollListener { public void setBoardListener(BoardListener listener) { mBoardListener = listener; } BoardView(Context context);  BoardView(Context context, AttributeSet attrs);  BoardView(Context context, AttributeSet attrs, int defStyleAttr); @Override boolean onInterceptTouchEvent(MotionEvent event); @Override boolean onTouchEvent(MotionEvent event); @Override void computeScroll(); @Override void onAutoScrollPositionBy(int dx, int dy); @Override void onAutoScrollColumnBy(int columns); RecyclerView getRecyclerView(int column); DragItemAdapter getAdapter(int column); int getItemCount(); int getItemCount(int column); int getColumnCount(); View getHeaderView(int column); View getFooterView(int column); int getColumnOfHeader(View header); int getColumnOfFooter(View footer); void removeItem(int column, int row); void addItem(int column, int row, Object item, boolean scrollToItem); void moveItem(int fromColumn, int fromRow, int toColumn, int toRow, boolean scrollToItem); void moveItem(long itemId, int toColumn, int toRow, boolean scrollToItem); void replaceItem(int column, int row, Object item, boolean scrollToItem); void scrollToItem(int column, int row, boolean animate); void scrollToColumn(int column, boolean animate); void clearBoard(); void removeColumn(int column); boolean isDragEnabled(); void setDragEnabled(boolean enabled); int getFocusedColumn(); void setColumnWidth(int width); void setColumnSpacing(int columnSpacing); void setBoardEdge(int boardEdge); void setSnapToColumnsWhenScrolling(boolean snapToColumn); void setSnapToColumnWhenDragging(boolean snapToColumn); void setSnapToColumnInLandscape(boolean snapToColumnInLandscape); void setColumnSnapPosition(ColumnSnapPosition snapPosition); void setSnapDragItemToTouch(boolean snapToTouch); void setBoardListener(BoardListener listener); void setBoardCallback(BoardCallback callback); void setCustomDragItem(DragItem dragItem); void setCustomColumnDragItem(DragItem dragItem); DragItemRecyclerView insertColumn(final DragItemAdapter adapter, int index, final @Nullable View header, @Nullable View columnDragView, boolean hasFixedItemSize); DragItemRecyclerView insertColumn(final DragItemAdapter adapter, int index, final @Nullable View header, @Nullable View columnDragView, boolean hasFixedItemSize, @NonNull RecyclerView.LayoutManager layoutManager); void insertColumn(int index, @NonNull ColumnProperties columnProperties); DragItemRecyclerView addColumn(final DragItemAdapter adapter, final @Nullable View header, @Nullable View columnDragView, boolean hasFixedItemSize); DragItemRecyclerView addColumn(final DragItemAdapter adapter, final @Nullable View header, @Nullable View columnDragView, boolean hasFixedItemSize, @NonNull RecyclerView.LayoutManager layoutManager); void addColumn(@NonNull ColumnProperties columnProperties);  }