cody
cody

Reputation: 755

Is it possible to "Draw" a string to a canvas?

I've largely been using drawable resources to a canvas using a method similar to this:

image.setBounds(x, y, ( x + 100 ), ( y + 100));
image.draw(c);

I want to do the same thing with a string, or more specifically an integer. Point is, I need to be able to display dynamically changeable characters on the canvas. Is there an easy method to do this similar to the drawable method above?

Upvotes: 0

Views: 196

Answers (2)

Mikola
Mikola

Reputation: 9326

Use Graphics.drawString.

Upvotes: 1

zienkikk
zienkikk

Reputation: 2414

Try the Canvas.drawText(...) method

Upvotes: 5

Related Questions