I'm migrating a project from android native to .net maui, by replacing native forms with embedded maui views (following the embedding method described in this MSDN page)
However, now I'm facing a tricky issue: there is an android native control, which draws some elements on a canvas and I would like to migrate it in .net maui as well.
Now, I'm wondering if there is a way to do that, maybe converting the Android.Graphics.Canvas object in a Maui.Graphics.Canvas, or embedding directly the android control in maui.
public class AndroidNativeControl
{
// option 1: converting this object in a Microsoft.Maui.Graphics.Canvas
public Android.Graphics.Canvas Canvas { get; set; }
// option 2: show this object in a .net maui content view
protected internal Android.Views.View View { get; protected set; }
}
Here a representation of the visual tree I would like to obtain:
- Android Native page
- Maui embedded view
- Maui stuff (e.g. label)
- Converted canvas / android view
- Maui stuff (e.g. button)