Skip to content

Tap gestures not working while using DragAndDrop #61

@NickeManarin

Description

@NickeManarin

Platform (please complete the following information):

  • OS: Android
  • Device: AndroidEmulator
  • Sdk vervion: Android SDK 28 (Pie)
  • Xamarin.Forms: 4.0.0.482894

Describe the bug
I'm using a HorizontalListView with DraggableViewCell as the item template.
Tap events are not triggered on the ViewCell (Both the event Tapped as the attached command TapCommandEffect.Tap and any custom command that I created by extending the DraggableViewCell class).
The TapCommandEffect.Tap attached command works normally while being used on a ContentView inside the ViewCell.

To Reproduce

<r:HorizontalListView x:Name="MainListView" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" ColumnCount="2"
                      CollectionPadding="16" ItemSpacing="8" EnableDragAndDrop="True" ItemHeight="120"
                      ItemsSource="{Binding Items}" ListLayout="Grid">
     <r:HorizontalListView.ItemTemplate>
        <DataTemplate>
            <r:DraggableViewCell x:Name="DraggableViewCell"
                             e:ViewEffect.TouchFeedbackColor="Coral" 
                             e:TapCommandEffect.Tap="{Binding BindingContext.SelectPhotoCommand, Source={x:Reference ThisView}}"
                             e:TapCommandEffect.TapParameter="{Binding .}">
                <ContentView>
                    <Grid Margin="5" BackgroundColor="CadetBlue">
                    </Grid>
                </ContentView>
            </r:DraggableViewCell>
        </DataTemplate>
    </r:HorizontalListView.ItemTemplate>
</r:HorizontalListView>

I'm using a ObservableCollection as my backing list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions