This is my view for drawing :
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
this.canvas = canvas;
canvas.drawCircle(this.getWidth()/2,this.getHeight()/2,100, locationPaint);
canvas.drawCircle(this.getWidth()/2,this.getHeight()/2,300, locationPaint);
//canvas.drawRect(this.getWidth()/2,this.getHeight()/2,100,100, locationPaint);
}
public void drawCircle(float centerX, float centerY, float width, float height){
int ratio = 10;
canvas.drawCircle(centerX/ratio,centerY/ratio,width/ratio,circlePaint);
canvas.drawCircle(this.getWidth()/2,this.getHeight()/2,200, locationPaint);
}
But when i call drawCircle, it didn't draw nothing on the view, i don't know why... Do you know if i have to call onDraw somewhere ?
Delete your drawcircle method that you made. I don't think that you need super.onDraw() reason You don't need this.canvas = canvas;