twoway-view icon indicating copy to clipboard operation
twoway-view copied to clipboard

Drag & drop feature support

Open NeoLSN opened this issue 10 years ago • 16 comments

Will the drag & drop feature be supported by this library?

NeoLSN avatar Sep 24 '14 09:09 NeoLSN

Yep, I'm considering doing something like a pluggable drag-n-drop support in the same style than the current click and selection support implementations.

lucasr avatar Sep 24 '14 13:09 lucasr

Will the library support header/footer view?

kuloud avatar Sep 25 '14 01:09 kuloud

+1

ghost avatar Oct 14 '14 14:10 ghost

Eu amaria demais ver isso :D

ghost avatar Oct 14 '14 14:10 ghost

@Kuloud Depends on what you mean by "header/footer". Right now, you can easily mimic a header/footer in a StaggeredGridLayoutManager by using spans, for example. Same with SpannableGridLayoutManager. I might add column/row span to GridLayoutManager as well.

lucasr avatar Oct 14 '14 14:10 lucasr

@lucasr Have you started implementing drag-drop yet? I was going to port my AbsListView version to RecyclerView, but I'd much rather use TwoWayView :-)

I took a quick look, and the port wouldn't be that complicated (RecyclerView actually makes parts of it simpler). Would you mind if I took a shot at it?

eygraber avatar Oct 28 '14 11:10 eygraber

@eygraber go for it :-)

On Tue, 28 Oct 2014 11:55 eygraber [email protected] wrote:

@lucasr https://github.com/lucasr Have you started implementing drag-drop yet? I was going to port my AbsListView version to RecyclerView, but I'd much rather use TwoWayView :-)

I took a quick look, and the port wouldn't be that complicated (RecyclerView actually makes parts of it simpler). Would you mind if I took a shot at it?

— Reply to this email directly or view it on GitHub https://github.com/lucasr/twoway-view/issues/110#issuecomment-60744216.

lucasr avatar Oct 28 '14 13:10 lucasr

Cool. I can implement it as a subclass of TwoWayView, or in TwoWayView itself (via a helper class). Which would you prefer?

eygraber avatar Oct 28 '14 19:10 eygraber

Implemented in PR https://github.com/lucasr/twoway-view/pull/149

eygraber avatar Oct 29 '14 07:10 eygraber

@eygraber I've tested your implementation of reordering and it works very well, congratulations, but what do you think about implement the rearranging of the ListView cells on drag/drop events such as we can see in ListViewAnimations -> Item manipulation and in DevBytes - ListView Cell Dragging and Rearranging. Thanks in advance :smile:

ghost avatar Nov 03 '14 04:11 ghost

@HoracioFilho I believe the way to do this is with a RecyclerView.ItemAnimator.

eygraber avatar Nov 03 '14 04:11 eygraber

@eygraber Hello, thanks for the comment, I need to research more, and I'll return with the results, but beforehand, I think it can be done by joining RecyclerView.ItemDecoration + RecyclerView.ItemAnimator + ViewCompat.animate method. Please, look at this commit https://github.com/gabrielemariotti/RecyclerViewItemAnimators/commit/da7abb5e8cef9c1261255200ff2bb11e1628938a, Gabriele Mariotti have worked in a "Swipe To Dismiss" pattern implementation compatible with RecyclerView and he have used similar to that described above.

ghost avatar Nov 03 '14 06:11 ghost

@HoracioFilho I haven't really looked into it, but shouldn't ItemAnimator.animateMove do the trick?

eygraber avatar Nov 04 '14 15:11 eygraber

Any news on the drag & drop implementation?

ErikTheSGRV avatar Dec 13 '14 18:12 ErikTheSGRV

I would like to see drag&drop support too, as well as swipe to dismiss.

ertanden avatar Dec 21 '14 13:12 ertanden

Any update on this? I need a drag&drop implementation in my app and this seems like a clean solution!

fnberta avatar Feb 08 '15 21:02 fnberta