android - canvas draw text- cant get strings -
string str = new string(); str = "111"; x = width / 2; y = math.round(height / 1.3); while (pressed != true){ if (!holder.getsurface().isvalid()) continue; canvas c = holder.lockcanvas(); c.drawbitmap(galaxy, 0, 0, null); c.drawbitmap(player, x - (player.getwidth() / 2), y - (player.getheight() / 2), null); c.drawtext("111", c.getwidth() / 12, c.getheight() / 15, timerpaint); holder.unlockcanvasandpost(c); }
i tried put str
insted "111" in "drawtext" function, , didn't write anything, i'm not sure why.
thanks!
replace this:
string str = new string(); str = "111";
with this:
string str = " 111";
hope answer helps.
Comments
Post a Comment