0
我目前拥有以我的语言使用RTL的Galaxy Note 4,每当我运行我的应用程序时,它都是从右向左工作,而应用程序是英语。强制应用程序工作LTR
我需要某种“强制”应用程序在所有类型的设备,RTL和LTR中成为LTR。
我该如何强制呢?
我目前拥有以我的语言使用RTL的Galaxy Note 4,每当我运行我的应用程序时,它都是从右向左工作,而应用程序是英语。强制应用程序工作LTR
我需要某种“强制”应用程序在所有类型的设备,RTL和LTR中成为LTR。
我该如何强制呢?
添加在styles.xml在你的基础应用主题风格:
<item name="android:layoutDirection">ltr</item>
例:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorPrimary</item>
<item name="android:screenOrientation">portrait</item>
<item name="android:layoutDirection">ltr</item>
</style>
我认为你可以使用'机器人:supportsRtl = “假”'你的应用程序清单' '文件。看看[这](http://stackoverflow.com/questions/34179179/what-is-use-of-androidsupportsrtl-true-in-androidmanifest-xml-file)和[this](http://stackoverflow.com /问题/ 34179179 /什么 - 是 - 使用 - 的 - androidsupportsrtl真功能于androidmanifest的XML文件)。 –
我把这个应用程序错误。无法调试。我正在使用的软件包支持RTL,因此它看起来像是一个问题 – TheUnreal