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

SKCanvasViewRenderer is internal #218

Closed
evan-choi opened this issue Jan 17, 2017 · 5 comments
Closed

SKCanvasViewRenderer is internal #218

evan-choi opened this issue Jan 17, 2017 · 5 comments
Milestone

Comments

@evan-choi
Copy link

i want add 'OnGlobalLayoutListener' on SKCanvasView in Xamarin Forms Android.
But SkiaSharp.Forms SKCanvasViewRenderer is defined internal.

@mattleibow
Copy link
Contributor

I am looking at this, there are a few things to do before making the type public. However, are you able to see if you can attach the handler using effects: https://developer.xamarin.com/guides/xamarin-forms/effects/introduction/

You can do that and just add the effect for Android - no need to create a custom renderer. You can access the native control and even cast it to SKCanvasView

@evan-choi
Copy link
Author

I already solved it by edited the SkiaSharp open source, but thanks for the good way.

@mattleibow
Copy link
Contributor

In a recent commit (af51bb4), I changed the visibility to public so that custom renderers can be created.

This is just the basic access to the types, so you can't control some things (intercepting existing events, controlling the render loop on GL views, change the actual underlying native view). I was going to do a bit more, but there are a few things that need thought. So, I decided to just allow for customizations on to of what's there for the first release.

I am closing this issue as my commit actually adresses the feature, and other changes should be on a new issue

@mattleibow mattleibow added this to the 1.56.1 milestone Feb 7, 2017
@mattleibow
Copy link
Contributor

I created a simple sample app that uses custom renderers: https://github.com/mattleibow/SkiaSharpFormsRendererDemo

@evan-choi
Copy link
Author

WOWWWW!! Thanks for response. This is what I was going to do.

@ghost ghost locked as resolved and limited conversation to collaborators Aug 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants