I have a problem. I am using SkiaSharp to make a TriangleGrid. Now I am doing drawing the Grid, but now I want to touch a triangle in the grid to color it. To do that I need to add a TouchEvent to the SKCanvasView, but I dont know how to do that.
On the internet I can find the next example:
- https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/graphics/skiasharp/paths/finger-paint
- https://github.com/mattleibow/SkiaSharpDemo/blob/master/SkiaSharpDemo/SkiaSharpDemo/MainPage.xaml
But I am using Xamarin Android and those example doesn't work in my code. I also tried to use:
skiaView = FindViewById<SkiaSharp.Views.Android.SKCanvasView>(Resource.Id.skiaView);
skiaView.SetOnTouchListener += OnTouch;
But that gives me the error: "Cannot assign to 'SetOnTouchListener' because it's a 'method group'"
Can anyone help me to get a TouchListener on my SkiaSharp canvas!?