Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Views.Forms.SKTouchAction.Moved event not Firing on Android #334

Closed
kevinandrewsde opened this issue Jul 6, 2017 · 2 comments
Closed

Views.Forms.SKTouchAction.Moved event not Firing on Android #334

kevinandrewsde opened this issue Jul 6, 2017 · 2 comments
Projects

Comments

@kevinandrewsde
Copy link

Hi,

i am trying to implement finger painting on an SKCanvasView by building SKPaths from SKTouchAction.Moved events, which works perfectly when debugging in UWP. However, when debugging on a real Android device (or in an emulator), i only get a SKAction.Pressed event, never a SKTouchAction.Moved event.

The Canvas is not in a Scrollview, there are no Gesturehandlers attached anywhere near it.

Can provide code if necessary.

Greetings

@mattleibow
Copy link
Contributor

mattleibow commented Jul 7, 2017

This sounds like you didn't let the OS know that you wanted to continue receiving touch events:

private void OnTouch(object sender, SKTouchEventArgs e)
{
	// handle the touch event

	// let the OS know we are interested
	e.Handled = true;
}

UWP/macOS don't really require it, as the OS is capable of sending events to multiple destinations, but iOS/Android need you to indicate that you want to receive them. Android will not even send any events further if you don't handle the pressed event - the parent will probably get them all.

@kevinandrewsde
Copy link
Author

that did the trick, works perfectly now, thanks!

@mattleibow mattleibow added this to Complete / Invalid in Triage May 5, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Triage
  
Done
Development

No branches or pull requests

2 participants