davideas / FlexibleAdapter

Fast and versatile Adapter for RecyclerView which regroups several features into one library to considerably improve the user experience :-)
Apache License 2.0
3.55k stars 553 forks source link

Adding improved swipe capability #315

Open mikeKickserv opened 7 years ago

mikeKickserv commented 7 years ago

I know swipe to dismiss is built into the library. Is there the capability to add swipable cells similar to this library? Currently I am using both libraries in my project and it would be great to have just one library. https://github.com/daimajia/AndroidSwipeLayout

davideas commented 7 years ago

@mikeKickserv, thank you for your message! I will need to study that library to not reinvent it, as I just saw it is possible to include key classes in my code. Anyway, it will require big amount of time, which now I do not have. I will not put any milestone for this improvement.

If you want, you can start a new branch to merge the 2 libraries only for the RecyclerView. Then you can create a PR on it.

This is also a valid alternative: https://github.com/chthai64/SwipeRevealLayout

davideas commented 7 years ago

Trying to implement the swipe with ViewDragHelper "hidden" helper.

Resources:

PS. This has wide extensions! (Later Panels?)

davideas commented 7 years ago

From a first analysis, it has a big implication on how the click listeners are set. Since the drag helper makes use of onInterceptTouchEvent() and onTouchEvent(), they might be coordinated in these 2 functions too.

davideas commented 7 years ago

Unfortunately, I still don't find a good alternative to improve the swipe capability: the TouchListener seems to be the solution most used by others libraries, but here it will require a deep change for the existent click listeners in the ViewHolder and lot of time that now I can't dedicate.

The swipe-to-delete, however has been simplified a bit.