When I run my app for debugging I get this error: Error CS0115: 'GraphicsAndAnimation.MainActivity.OnDraw(Android.Graphics.Canvas)': no suitable method found to override
Here is my code: { protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle);
Bitmap bitMap = Bitmap.CreateBitmap (100, 100, Bitmap.Config.Argb8888);
Canvas canvas = new Canvas (bitMap);
SetContentView (Resource.Layout.Main);
}
protected override void OnDraw(Canvas canvas)
{
base.OnDraw (canvas);
Paint green = new Paint
{
AntiAlias = "true",
Color = Color.RGB(0x99, 0xcc,0)
};
Paint red = new Paint
{
AntiAlias = "true",
Color = Color.Rgb(0xff, 0x44, 0x44)
};
red.SetStyle (Paint.Style.FillStroke);
float middle = canvas.Width * 0.25f;
canvas.DrawPaint (red);
canvas.DrawRect (0, 0, middle, canvas.Width, green);
}
}