How can I output text Right to Left (i.e. in reverse order) using Canvas.drawText ? Is开发者_C百科 there a way?
Set Paint.Align
property in your textPaint
object, if you set it RIGHT -- The text is drawn to the left of the x,y origin:
textPaint.setTextAlign(Paint.Align.RIGHT);
canvas.drawText("your text here", getRight(), getY()/2, textPaint);
Check this out: How to draw RTL text (Arabic) onto a Bitmap and have it ordered properly?
精彩评论