I want to create a list, for example, To-Do List.
In this User is allowed to select/unselect an item, reorder according to their priority. In the current scenario, I am able to give them all of the above functionality using ItemTouchHelper.SimpleCallback
.
My Challenge starts here -
- When User selects an item(or right swipe it) I need to show that row disabled with strike-through text.
- In such a case, I am changing its position and after that, all features like
Drag & Drop
,Swipe Left or Right
should not work on that particular row. - And, If the user manually unselects it by tapping an icon, all the mentioned gestures should work.
I read about Method getSwipeDirs
but didn't understand how to utilize it in my scenario.
I have gone through a couple of articles but all of them remove an item on swipe. Hence, I couldn't find the reference for my case.
If anyone has an idea about it and guide me further then it would be a great help! I am open
Note: I have used com.daimajia.swipe.SwipeLayout library just for left swipe as I want to enable full swipe just for Right direction. I am able to disable the library swipe by utilizing some of its methods. However, I still can not disable Drag/Drop or Right Swipe which I am using with help of ItemTouchHelper.SimpleCallback
.