Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollectionView pan gesture problem and suggestion #97

Open
felidevelop opened this issue May 12, 2023 · 0 comments
Open

CollectionView pan gesture problem and suggestion #97

felidevelop opened this issue May 12, 2023 · 0 comments

Comments

@felidevelop
Copy link

felidevelop commented May 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant