Wednesday, February 5, 2014

Andrews novices learn the word canvas to write does not show?


            
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 solving
Reply:
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:

cited a floor coolboyyzy reply:
Hey, coordinates can be set to 10, 10, 0,0 why not? 0,0 is the top left corner is not it?

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