Page 1 of 1

Can't seem to respond to TouchUp on a ListViewItem on Android (2.2.6)

Posted: 14 Jun 2020, 21:51
by Jamieh
I am still working on 2.2.6. I'm having an issue with our Android build.

I've got a ListView, and I've got it responding to TouchDown events. But I cannot seem to get the corresponding TouchUp event no matter what I try.

Here is my XAML for the ListView.ItemContainerStyle:
<ListView.ItemContainerStyle>
  <Style TargetType="{x:Type ListViewItem}">
    <Setter Property="noesis:StyleInteraction.Triggers">
      <Setter.Value>
        <noesis:StyleTriggerCollection>
          <i:EventTrigger EventName="TouchDown">
            <i:InvokeCommandAction
              Command="{Binding DataContext.ListViewDownCommand, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
              CommandParameter="{Binding}"/>
          </i:EventTrigger>
          <i:EventTrigger EventName="TouchUp">
            <i:InvokeCommandAction
              Command="{Binding DataContext.ListViewUpCommand, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
              CommandParameter="{Binding}"/>
          </i:EventTrigger>
        </noesis:StyleTriggerCollection>
      </Setter.Value>
    </Setter>
  </Style>
</ListView.ItemContainerStyle>
Any idea what I could be doing wrong? Does something else in ListViewItem eat the TouchUp event and I have to override it and mark the event as unhandled?

I've got logging in, and in LogCat I can see the TouchDown happening, but the TouchUp is just never there. I tried PreviewTouchUp too with no luck.

Is this something that I need to upgrade to 3.0 for?

Thanks!

Re: Can't seem to respond to TouchUp on a ListViewItem on Android (2.2.6)

Posted: 15 Jun 2020, 16:27
by sfernandez
We fixed a few things related to touch events for 3.0 version, in particular a bug where TouchUp events were not raised on some situations, so if you could please try it with our latest version it is probably solved.