RTL的Andr​​oid语言环境。支持的语言环境时,如何只反映?语言、环境、RTL、Andr

2023-09-05 04:52:30 作者:怪兽哪里跑

我有一个支持希伯来文,并宣布为RTL语言环境的明显支持的应用程序。不过,也有我不支持其他语言环境的RTL,并希望我的查看 S当这些语言环境设置为不被镜像。例如,我不希望我的应用程序的查看 s到从右换在阿拉伯语语言环境的时候离开,因为我不支持阿拉伯语,因此文本显示英文。

I have an app that supports Hebrew and declares in the manifest its support for RTL locales. However, there are other RTL locales that I do not support and would like my Views not to be mirrored when these locales are set. For example, I don't want my app's Views to be swapped from right to left when in the Arabic locale, since I don't support Arabic and therefore text will show in English.

推荐答案

您可以选择打开运行时镜像或关闭。请参见 http://stackoverflow.com/a/17683045/192373 。这是您的活动限制在4.2或更高,只有在的onCreate()。

You can choose to turn mirroring on or off at runtime. See http://stackoverflow.com/a/17683045/192373. This is limited to 4.2 or higher, and only in onCreate() of your activity.