Questions tagged [itemtouchhelper]

Use this tag for questions related to the Android widgets ItemTouchHelper utility class.

ItemTouchHelper is a utility class part of Android support widgets to add swipe to dismiss and drag & drop support to RecyclerView.

191 questions
0
votes
0 answers

How can i use ItemTouchHelper On Moving RIGHT or LEFT to move to a new Activity or Fragment

I have implemented itemTouchHelper to my RecyclerView.Can I use the Drag direction of itemTouchHelper to navigate to another class or fragment for ex, if I use ItemTouchHelper.RIGHT to move to another Activity. ItemTouchHelper.SimpleCallback…
0
votes
1 answer

How to reset the background buttons (swipe menu) of the recyclerview programmatically?

I have a recyclerview which has a swipe menu (background buttons) on my android app. The article that I referred to is: https://codeburst.io/android-swipe-menu-with-recyclerview-8f28a235ff28 This article was quite helpful and I succeeded to embed…
0
votes
1 answer

How to delete item in recycler view through swipe with bounce effect

I know delete recycler view item through swipe with ItemTouchHelper.SimpleCallback immediately. But I want to add more function. If user pulls left the item over a certain distance, item will be deleted. If user has not pulled left more than a…
hanjiman
  • 465
  • 1
  • 6
  • 17
0
votes
1 answer

Apply design as user is swiping and removing design on aborted swipe

I have: A RecyclerView where I can swipe cards to the right. I want: Add a border to the selected card while the user is holding down her finger to swipe. However, as soon as the user lets go of their finger and aborts the swipe, I want the border…
The Fluffy T Rex
  • 430
  • 7
  • 22
0
votes
1 answer

java.lang.IndexOutOfBoundsException error when using ItemTouchHelper in recyclerView?

I've read all the stackoverflows with this theme so far and the problem is not solved. I have an ItemTouchHelper : ItemTouchHelper helper = new ItemTouchHelper(new ItemTouchHelper.SimpleCallback( 0, …
Levi007
  • 315
  • 1
  • 3
  • 13
0
votes
1 answer

RecyclerView swipe action without deletion

I want a RecyclerView with swipe gesture to trigger a action like mark the swiped item as favorit. It is possible to use the ItemTouchHelper but disable the view deletion after swipe? A common pattern is a swipe to display some button but this is…
Happo
  • 1,375
  • 3
  • 16
  • 34
0
votes
1 answer

Android SortedList drag and re Order Items throwing IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolde

I'm facing an issue with recycler-view implementation with sortedList.I need to implement the drag and re-order feature for this recycle view, I used the " ItemTouchHelper.Callback()" to handle the up/down move class…
0
votes
0 answers

ItemTouchHelper in RecyclerView that has nested horizontal RecyclerView - can't scroll nested RecyclerView

RecyclerView uses ItemTouchHelper for swipe-to-dismiss ViewHolder contains nested horizontal RecyclerView Nested horizontal RecyclerView cannot be scrolled, instead whole ViewHolder gets swiped because ItemTouchHelper intercepts the swipe. How do…
Sermilion
  • 1,920
  • 3
  • 35
  • 54
0
votes
1 answer

Androidx swipe to show delete icon in recycler view and swipe further to delete

I implemented a swipe left to delete action in my recycler view like below: ItemTouchHelper public class SwipeToDelete extends ItemTouchHelper.SimpleCallback { //my custom adapter private MyAdapter slAdapter; public…
bcsta
  • 1,963
  • 3
  • 22
  • 61
0
votes
0 answers

RecyclerView Swipe to delete Prevent delete animation on non-deletable items

I have created a recyclerView with swipe to delete functionality. I am having an item that I don't want to it to be archived. I want to implement the swipe on the items that cant be deleted so that the user can scroll a little bit, when he scroll…
Gal
  • 422
  • 5
  • 21
0
votes
1 answer

ItemTouchHelper does not update items when swiping

I have a RecyclerView that uses an ItemTouchHelper to allow users to swipe each item. Everything works fine on the initial load but if the items in the RecyclerView are updated (via a search feature) the items in the ItemTouchHelper.Callback never…
Kris B
  • 3,436
  • 9
  • 64
  • 106
0
votes
1 answer

RecyclerView ItemTouchHelper doesn't remove item

I'm trying to implement swipe to archive note in RecyclerView. It was working fine but after I added these codes to refresh the RecyclerView from onResume(), Swiping although does archive the Note, but the item doesn't get removed and stays at a…
Hamed
  • 459
  • 4
  • 20
0
votes
1 answer

Resize all recyclerview cells on itemTouchhelper during drag/reorder

I have a horizontal recyclerview which implements ItemTouchHelper callback for dragging and reordering cells. When a cell is being moved i want to shrink all of the cells widths so they all appear on screen. In onItemSelected() i can successfully…
nt95
  • 455
  • 1
  • 6
  • 21
0
votes
0 answers

Swipe left to delete, swipe right to rotate imageview

I am trying to use ItemTouchHelper.Simple callback to add Swipe To Delete to my recyclerview for LEFT swipes and I want to flip an imageview for RIGHT swipes WITHOUT moving the itemView position at all. Is there a way to use ItemTouchHelper to…
syntakks
  • 121
  • 1
  • 6
0
votes
0 answers

Crash after ItemTouchHelper gesture when switching fragment

I got a RecyclerView with an ItemTouchHelper implemented. The app crashes when swiping an item and changing the current fragment in the same time (Yeah I got a crashlytics about that and could reproduce it). The following crash exception is from…