androidx.recyclerview.widget.RecyclerView.OnItemTouchListener Java Examples

The following examples show how to use androidx.recyclerview.widget.RecyclerView.OnItemTouchListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PointerDragEventInterceptor.java    From FairEmail with GNU General Public License v3.0 6 votes vote down vote up
PointerDragEventInterceptor(
        ItemDetailsLookup<?> eventDetailsLookup,
        OnDragInitiatedListener dragListener,
        @Nullable OnItemTouchListener delegate) {

    checkArgument(eventDetailsLookup != null);
    checkArgument(dragListener != null);

    mEventDetailsLookup = eventDetailsLookup;
    mDragListener = dragListener;

    if (delegate != null) {
        mDelegate = delegate;
    } else {
        mDelegate = new DummyOnItemTouchListener();
    }
}
 
Example #2
Source File: ResetManager.java    From FairEmail with GNU General Public License v3.0 4 votes vote down vote up
OnItemTouchListener getInputListener() {
    return mInputListener;
}
 
Example #3
Source File: EventRouter.java    From FairEmail with GNU General Public License v3.0 4 votes vote down vote up
/**
 * @param toolType See MotionEvent for details on available types.
 * @param delegate An {@link OnItemTouchListener} to receive events
 *     of {@code toolType}.
 */
void set(int toolType, @NonNull OnItemTouchListener delegate) {
    checkArgument(delegate != null);

    mDelegates.set(toolType, delegate);
}