How can I output text Right to Left (i.e. in reverse order) using Canvas.drawText ? Is there a way?
Asked
Active
Viewed 2,388 times
2 Answers
1
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);
-
3Right-aligned text is not the same thing as right-to-left text. – yole Jan 14 '15 at 09:22
-1
-
But how do you "use manual BiDi"? In other words, assuming I can detect that I should be going to right to left, how do I tell the drawText function to output the text in reverse? – yydl Apr 07 '11 at 22:28
-