I have this class that extends View (it's in C# because I use Xamarin)
public class ScannerOverlay : View
{
public ScannerOverlay(Context context) : base(context)
{
//Initializing some values here
}
protected override void OnDraw(Canvas canvas)
{
base.OnDraw(canvas);
//Draw some stuff on the canvas
}
}
I create this view using: View v = new ScannerOverlay(context);
Now I want to add a button to this view. How do I do this? The view has no layout whatsoever so AddView() is not going to work. And from what I found it's not possible to draw a button on a canvas.