Android的RTL密码字段?字段、密码、Android、RTL

2023-09-06 08:37:12 作者:为了你╮拒绝一切暧昧

看来,如果你有在Android上的一个EditText

It appears that if you have an EditText on android with the

安卓inputType =textPassword安卓密码=真

在他们领域,从右到左的文本不出现从右到左(左保持到右)。

fields on them, right-to-left text does NOT appear right-to-left (stays left-to-right).

但是没有密码外延文中出现的RTL。

However without the password denotations the text does appear RTL.

这是一个已知的问题还是有解决方法吗?

Is this a known issue or is there a workaround?

推荐答案

我发现的唯一的解决办法是设置inputType后编程设置重力向左或向右。

The only solution I've found was to set the gravity programatically to LEFT or RIGHT after setting the inputType.