I have a problem with numbers when writing them, their place changes from the text when using the Arabic language

202 Views Asked by At

I have a problem with numbers when writing them, their place changes from the text when using the Arabic language Note that in the case of writing in English, no error occurs

enter image description here

TextPaint mTextPaint = new TextPaint();
StaticLayout mTextLayout = new StaticLayout( textToSave ,mTextPaint, canvas.getWidth() - 100, 
Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
canvas.save();
int textX = 50;
int textY = 50;
canvas.translate(textX, textY);

mTextLayout.draw(canvas);
canvas.restore();
1

There are 1 best solutions below

6
On

make sure you have written it well formatted in your xml string