Java Code Examples for androidx.recyclerview.widget.ItemTouchHelper#END
The following examples show how to use
androidx.recyclerview.widget.ItemTouchHelper#END .
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: ConversationItemSwipeCallback.java From mollyim-android with GNU General Public License v3.0 | 5 votes |
ConversationItemSwipeCallback(@NonNull SwipeAvailabilityProvider swipeAvailabilityProvider, @NonNull OnSwipeListener onSwipeListener) { super(0, ItemTouchHelper.END); this.itemTouchListener = new ConversationItemTouchListener(this::updateLatestDownCoordinate); this.swipeAvailabilityProvider = swipeAvailabilityProvider; this.onSwipeListener = onSwipeListener; this.shouldTriggerSwipeFeedback = true; this.canTriggerSwipe = true; }
Example 2
Source File: RemovableItemTouchHelperCallback.java From Android-nRF-Mesh-Library with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { if (viewHolder instanceof RemovableViewHolder) { final RemovableViewHolder vHolder = ((RemovableViewHolder) viewHolder); if (!(vHolder).isRemovable()) return 0; int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; return makeMovementFlags(0, swipeFlags); } else return 0; }
Example 3
Source File: DynamicTouchListener.java From dynamic-support with Apache License 2.0 | 5 votes |
@Override public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; return makeMovementFlags(dragFlags, swipeFlags); }
Example 4
Source File: TouchHelperCallback.java From SimplicityBrowser with MIT License | 5 votes |
@Override public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { int position = viewHolder.getAdapterPosition(); final int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; int swipeFlags = position == 0 ? 0 : ItemTouchHelper.START | ItemTouchHelper.END; return makeMovementFlags(dragFlags, swipeFlags); }
Example 5
Source File: SimpleItemTouchHelperCallback.java From UltimateRecyclerView with Apache License 2.0 | 5 votes |
@Override public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { // Enable drag and swipe in both directions final int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; final int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; return makeMovementFlags(dragFlags, swipeFlags); }
Example 6
Source File: ItemTouchHelperCallback.java From Android-Keyboard with Apache License 2.0 | 4 votes |
@Override public int getMovementFlags(@NotNull RecyclerView recyclerView, @NotNull RecyclerView.ViewHolder viewHolder) { int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; return makeMovementFlags(dragFlags, swipeFlags); }
Example 7
Source File: SimpleItemTouchHelperCallback.java From call_manage with MIT License | 4 votes |
@Override public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; return makeMovementFlags(dragFlags, swipeFlags); }
Example 8
Source File: SimpleItemTouchHelperCallback.java From financisto with GNU General Public License v2.0 | 4 votes |
@Override public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { final int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; final int swipeFlags = ItemTouchHelper.END | ItemTouchHelper.START; return makeMovementFlags(dragFlags, swipeFlags); }
Example 9
Source File: SavedColorListAdapter.java From revolution-irc with GNU General Public License v3.0 | 4 votes |
@Override public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { int dragFlags = ItemTouchHelper.START | ItemTouchHelper.END; int swipeFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; return makeMovementFlags(dragFlags, swipeFlags); }
Example 10
Source File: QueueItemTouchHelperCallback.java From CastVideos-android with Apache License 2.0 | 4 votes |
@Override public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { final int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; final int swipeFlags = ItemTouchHelper.END; return makeMovementFlags(dragFlags, swipeFlags); }
Example 11
Source File: SortFragment.java From prayer-times-android with Apache License 2.0 | 4 votes |
@Override public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; int swipeFlags = ItemTouchHelper.END; return makeMovementFlags(dragFlags, swipeFlags); }
Example 12
Source File: SortFragment.java From prayer-times-android with Apache License 2.0 | 4 votes |
@Override public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; int swipeFlags = ItemTouchHelper.END; return makeMovementFlags(dragFlags, swipeFlags); }
Example 13
Source File: ItemTouchHelperCallback.java From PhoneProfilesPlus with Apache License 2.0 | 4 votes |
@Override public int getMovementFlags(@NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder) { int dragFlags = ItemTouchHelper.UP | ItemTouchHelper.DOWN; int swipeFlags = ItemTouchHelper.START | ItemTouchHelper.END; return makeMovementFlags(dragFlags, swipeFlags); }