Android Studio 支持 rtl

Android Studio Support rtl

如何将 android 应用程序的默认语言设置为阿拉伯语而不是英语并使

默认支持RTL? 注意:我在 mainfast 中添加 android:supportsRtl="true" 但这不起作用

您需要将 android:layoutDirection="rtl" 添加到您的所有布局中,以使其默认为 RTL。

另外,您应该 运行 Android Studio > Refactor > Add RTL support where possible 让您的布局 RTL 友好。

在此处输入代码

configuration.setLocale(locale);

不使用

configuration.locale = locale;