 <p>This is by design. When changing the writing direction, everything is reversed: left becomes right and right becomes left. So you need <code>Element.ALIGN_LEFT</code> instead of <code>Element.ALIGN_RIGHT</code>.</p>