Jamieh
Topic Author
Posts: 44
Joined: 12 Apr 2019, 00:30

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

14 Jun 2020, 21:51

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!

Tags:
 
User avatar
sfernandez
Site Admin
Posts: 1935
Joined: 22 Dec 2011, 19:20

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

15 Jun 2020, 16:27

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.

Who is online

Users browsing this forum: Google [Bot] and 3 guests