Bug 26242 - Android ScrollViewRenderer implementation seems to capture touch events when it should not.
Summary: Android ScrollViewRenderer implementation seems to capture touch events when ...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-21 11:57 UTC by philip
Modified: 2015-02-10 00:32 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
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:
Status:
RESOLVED FIXED

Description philip 2015-01-21 11:57:34 UTC
I am capturing Android touch gestures in a child control of ScrollView.  Everything works well but under specific conditions I receive ACTION_CANCEL and stop receiving touch events.  I narrowed this down to the Xamarin.Forms ScrollView.  It happens under these conditions:

1. I touch the screen with 2 fingers
2. I can move one finger up and down and left and right and continue receiving events
3. I can move the second finger up and down and continue to receive events
4. When I move the second finger left or right, I receive ACTION_CANCEL

This happens even though the scroll view is not able to scroll (small content) and even though I disabled ScrollView capturing by settings InputTransparent in the PCL and doing this in a subclassed renderer:

		public override bool OnInterceptTouchEvent(MotionEvent ev)
		{
			if (this.Element.InputTransparent)
				return false;

			return base.OnInterceptTouchEvent(ev);
		}

Conclusion:  there is a bug in the Android ScrollView renderer which causes the ACTION_CANCEL when it should not.  When I replace the ScrollView with another container control the problem goes away.

I am hoping someone can see this bug just by looking at code but if necessary I can create a sample project to show this.
Comment 1 philip 2015-01-22 12:39:34 UTC
I managed to replicate this with single finger tough as well.  I have a vertical ScrollView and am able to move child elements using vertical finger movement, but the moment the finger moves left or right, ACTION_CANCEL is received and gesture notifications stop.

This is pointing very strongly at being a ScrollView bug
Comment 2 Jason Smith [MSFT] 2015-01-29 00:01:49 UTC
Thank you for your feedback! I will make sure it gets passed along to the appropriate person! :)
Comment 3 philip 2015-02-10 00:32:44 UTC
This appears to be fixed in 1.3.4.6365-pre1 but it's difficult to verify because of https://bugzilla.xamarin.com/show_bug.cgi?id=26665