My application uses RTL language (right to left).
(我的应用程序使用RTL语言 (从右到左)。)
When the EditText
field gets focus, the cursor appears on the left and only when the user starts to type, the cursor (and the RTL text) moves right.
(当EditText
字段获得焦点时,光标将显示在左侧,并且仅当用户开始键入时,光标(和RTL文本)才向右移动。)
When the user clicks "enter" to start a new line, the cursor moves to the left again. (当用户单击“输入”以开始新行时,光标再次移至左侧。)
When I use android:gravity="right"
, the cursor is OK (on the right) but as the user starts to type the text always moves to the the other side (RTL text moves left).
(当我使用android:gravity="right"
,光标是可以的(在右侧),但是当用户开始键入时,文本总是移到另一侧(RTL文本向左移动)。)
Any ideas how I can align text to the right AND keep the text direction?
(有什么想法可以使文本向右对齐并保持文本方向吗?)
ask by Asaf Pinhassi translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…