Hi all:
I'm writing a class that inherit from TextView, and override its onDraw()
method, but in the method, my invoke of canvas.drawText()
doesn't seems to work, the code just like below:
protected void onDraw(Canvas canvas) {
// super.onDraw(canvas);
Paint paint = new Paint();
paint.setColor(android.graphics.Color.WHITE);
paint.setTextSize(20);
String text = "hello";
canvas.drawText(text, 0, 0, paint);
}