Well, the new one View, replicate the onDraw method
protected void onDraw (Canvas canvas) {
Paint p = new Paint ();
p.setColor (Color.RED);
canvas.drawText ("Game", 0,0, p);
super.onDraw (canvas);
} , and then set a reference to the View protected void onCreate (Bundle savedInstanceState) {
in MainActivity insuper.onCreate (savedInstanceState);
this.requestWindowFeature (Window.FEATURE_NO_TITLE);
setContentView (new GameV (this));
} , I do not know why the simulator is an open blank, there is no word yet Game solvingReply:
Hey, the coordinates can be set to 10, 10, 0,0 why not? 0,0 is the top left corner is not it?
Reply:
Text is written from the lower left to start
Reply:
You draw to the screen outside the
Reply:
Is 0,0 point coordinates on the screen outside the
Then the upper left corner, but just a boundary.
Chuan Chi podcast
No comments:
Post a Comment