- 代码
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
paint.setColor(Color.BLACK);
canvas.drawRect(0, 0, 250, 250, paint);
}
}
-
ActionBar存在时
有ActionBar.PNG
-
ActionBar不存在时
无ActionBar.PNG
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
paint.setColor(Color.BLACK);
canvas.drawRect(0, 0, 250, 250, paint);
}
}
ActionBar存在时
ActionBar不存在时
本文标题:cavas坐标原点
本文链接:https://www.haomeiwen.com/subject/ziykphtx.html
网友评论