AndreiMisiukevich / TouchEffect

UI-responsive touch effects for Xamarin.Forms
MIT License
195 stars 33 forks source link

[Android] MotionEventActions.Move is not handled correctly #46

Closed Huaba93 closed 4 years ago

Huaba93 commented 4 years ago

Description

When leaving the vertical bounds of the VisualElement, the VisualElement is not reset. It is working horizontally.

Steps to Reproduce

  1. Add Toucheffect
  2. Touch + move vertically far enough to leave bounds

Expected Behavior

Command is not executed and control is reset to regular values.

Actual Behavior

Command is not executed but pressed values are not reset to regular values.

Basic Information

Tested with Samsung Galaxy S10 (Android 10)

Screencast

ezgif com-video-to-gif

AndreiMisiukevich commented 4 years ago

Hi, Is your button inside a scrollview or listview ?

Huaba93 commented 4 years ago

The button is inside a ScrollView. Outside of ScrollView it is working as expected.

Haven't tested it with ListView or CollectionView

AndreiMisiukevich commented 4 years ago

@Huaba93 try to set DisallowTouchThreshold = 10, it will make it slightly better

Huaba93 commented 4 years ago

Setting it to 10 makes it better for vertical scrolling but worse for horizontal. But this is good enough for me atm.

I bind it to the buttons height.

AndreiMisiukevich commented 4 years ago

Yeah, I know. But don't know how to fix this yet.

Huaba93 commented 4 years ago

Ok no problem, as i told, it is good enough ;) Thanks for your help and thanks for the whole project. It was very easy and went very fast to replace most of the TapGestureRecognizer with the TouchEffect. The app feels now much more responsive. It's a huge UX improvement!

AndreiMisiukevich commented 4 years ago

@Huaba93 thanks, mate :)

Huaba93 commented 4 years ago

Same problem on iOS. I used a collectionView. Any idea?

ezgif com-video-to-gif (1)

AndreiMisiukevich commented 4 years ago

Same problem on iOS. I used a collectionView. Any idea?

ezgif com-video-to-gif (1)

try to set DisallowTouchThreshold = 10

Huaba93 commented 4 years ago

this only works for Android, not iOS

AndreiMisiukevich commented 4 years ago

this only works for Android, not iOS

It should work for iOS as well DisallowTouchThreshold = 1

?

AndreiMisiukevich commented 4 years ago

this only works for Android, not iOS

try latest (no need to set DisallowTouchThreshold for iOS)

AndreiMisiukevich commented 4 years ago

hi @Huaba93 https://github.com/AndreiMisiukevich/TouchEffect/issues/51

Huaba93 commented 4 years ago

I had no time to test, but I will soon ;)