Bug 52247 - Pan Gesture twinkles in Xamarin on Android project
Summary: Pan Gesture twinkles in Xamarin on Android project
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
Depends on:
Reported: 2017-02-02 13:17 UTC by Yura Babiy
Modified: 2017-06-20 13:32 UTC (History)
7 users (show)

Tags: android, pangesturerecognizer, custom control ac
Is this bug a regression?: Yes
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Comment 1 Yura Babiy 2017-02-06 07:54:21 UTC
Soon my question from StackOverflow can be deleted so I will explain this bug here.
I implemented range slider from here: https://github.com/Manne990/RangeSliderView
and it was working. But when I attached this to my actual project then it has twinkle on Android. 
I started to dig into this problem and found that doesn't work because of Xamarin.Forms NuGet package version. I am clearly sure that it works fine on and but after it's not. On iOS it works always. 
To reproduce this you can just download that sample from GitHub and install another version of the NuGet package.
Comment 2 Yura Babiy 2017-02-09 12:49:33 UTC
Comment 3 Yura Babiy 2017-02-17 09:00:24 UTC
Here is a video that demonstrates behavior of bug:
And sample project:
Comment 4 Jimmy [MSFT] 2017-03-14 15:42:57 UTC
I am able to reproduce the issue described with the project linked in comment 3. I can confirm the issue does _not_ occur with 

There were some fixes[1][2] to the PanGestureRecognizer in Android after that might be affecting this. The Forms built in Slider works as expected so it's unclear whether the fixes mentioned are directly causing this new issue or if the custom slider implementation needs to account for the new fixes.

I am confirming this report in the meantime so the team can investigate further.

### Regression Test
Forms 2.3.4-pre4    BAD
Forms     BAD
Forms     GOOD

[1] https://github.com/xamarin/Xamarin.Forms/pull/313
[2] https://github.com/xamarin/Xamarin.Forms/pull/389
Comment 5 Yura Babiy 2017-03-15 09:47:22 UTC
Glad to hear it, thank you. Waiting for future investigations.
Comment 6 Ido Shviro 2017-03-15 13:39:24 UTC
Hello, I noticed this issue as well.
I Think it started after the fix of "Complete event not firing after slow panning".
I also noticed it is only happening when you start panning fast, if you start panning really slow it works fine.
Hope this information helps. Waiting for the bug fix.
Thank you!
Comment 7 Samantha Houts [MSFT] 2017-04-13 02:33:59 UTC
Please try 2.3.5-pre1. I believe this issue is resolved by https://github.com/xamarin/Xamarin.Forms/pull/845 (for Images, Labels, and Buttons, at least). Thank you!
Comment 8 Yura Babiy 2017-04-13 06:47:33 UTC
Yes, seems that it has been fixed. Excited to see it. Thank you, guys!
Comment 9 Ido Shviro 2017-04-20 16:10:27 UTC
Hey, my problem doesn't seem to be fixed..
I'm using PanUpdated on Grid inside ContentView.
It's still twinkles:/
Comment 10 Samantha Houts [MSFT] 2017-05-26 16:39:50 UTC
@Ido Shviro

We understand that this issue may be present on controls other than Images, Labels, and Buttons at this time. The fix does require that we switch all controls over to our new "fast renderer" model, which is an ongoing effort. 

In the meantime, if you are able to put the PanGesture on a container *around* the Grid instead of on the Grid itself, that may resolve your problem.

Let me know if you have any further questions.

Thank you!
Comment 11 Björn Bentmar 2017-06-07 15:44:32 UTC
What do you mean by " put the PanGesture on a container *around* the Grid instead of on the Grid itself" Samantha? 

Comment 13 Ido Shviro 2017-06-20 12:28:08 UTC
Putting the panning on ContentView that wrapping the grid solved the problem.
Thank you!
Comment 14 Björn Bentmar 2017-06-20 13:18:15 UTC
<ContentView (with pangesture)>

Wrapping it like this made no difference to me, im on 2.3.5 pre 3
Comment 15 Ido Shviro 2017-06-20 13:32:22 UTC
I had pan on grid

<Grid (with pangesture)>

which did not work properly

I changed it to 

<ContentView (with pangesture)>

now it works fine