3

Hello I have a AbsoluteLayout with a (pan)="onPan($event)" gesture on it.

I noticed if I have a ScrollView on the page and you try to pan from the scroll view the onPan event is no longer triggered. This only happens on android, it works perfectly on IOS.

  <AbsoluteLayout width="100%" (pan)="onPan($event)">
    <StackLayout left="{{tabs.store.left}}" height="100%" width="100%">
        <store></store>
    </StackLayout>

    <StackLayout left="{{tabs.profile.left}}" height="100%" width="100%" class="StaticBg">
      <profile></profile>
    </StackLayout>
  </AbsoluteLayout>

My store component has a ScrollView and you can't pan from that page on android. Any help would be greatly appreciated!

Matt
  • 137
  • 2
  • 14

1 Answers1

3

By nature Android's ScrollView operates by intercepting it's touch events. So you might have to add the pan event to ScrollView / it's child component.

Manoj
  • 21,753
  • 3
  • 20
  • 41
  • Thanks that fixed it, I appreciate the help! – Matt Nov 06 '18 at 16:51
  • I really hoped I would find a simple fix to a massive issue. Thanks I found your answer! Have a good day! – Vincent Duprez Dec 07 '18 at 21:40
  • What if you have 2 containers inside the `` that need to handle gestures? Ex: 2 image carousels inside one ``? Sample/example would be much appreciated. – rynop Nov 04 '19 at 16:25