roubachof/Sharpnado.CollectionView

CollectionView pan gesture problem and suggestion

Opened this issue · 0 comments

Hi Sharpnado,

first, congratulation, the CollectionView plugin is great. Allow to do draganddrop item on android and ios and therefore reordening personalized lists.

But i found a problem with pangesture.
For example I use this and the swipeview not allow pangesture to draganddrop elements. And if i delete swipeview, then pangesture work. The problem is that is bad, because i can need the swipeview.

And i have a suggestion, is possible to add a personalized element, a boxview or another element, and that element is responsible for recognizing the pangesture and not all area of the draggableviewcell? Apps like youtube or spotify have that style for their reorderable lists.

`<cv:CollectionView x:Name="sortablelist" CollectionLayout="Vertical" ColumnCount="2" EnableDragAndDrop="True" ItemHeight="80" DragAndDropTrigger="Pan">

                    <cv:CollectionView.ItemTemplate>
                        <DataTemplate>
                                <cv:DraggableViewCell>

                                    <SwipeView>

                                        <SwipeView.RightItems>
                                            <SwipeItems Mode="Reveal">
                                                <SwipeItem BackgroundColor="Red" Text="Delete" />
                                            </SwipeItems>
                                        </SwipeView.RightItems>

                                        <Grid Padding="10">
                                            
                                                <Grid.GestureRecognizers>
                                                    <TapGestureRecognizer Tapped="ItemSelected" CommandParameter="{Binding .}" />
                                                </Grid.GestureRecognizers>

                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="*" />
                                                </Grid.ColumnDefinitions>

                                                <Label Grid.Column="0" Text="{Binding text}" />

                                            </Grid>

                                    </SwipeView>
                                    
                                    
                            </cv:DraggableViewCell>
                        </DataTemplate>
                    </cv:CollectionView.ItemTemplate>

                </cv:CollectionView>`

Something like this
https://github.com/knopp/flutter_reorderable_list