Jae*_*ger 7 android android-layout android-studio
我在我的应用程序中有这个问题,这非常奇怪.
我有一个应用程序,当我在Android Studio上按Run时,它会以正确的布局方向启动应用程序.现在,我按下返回按钮并返回到应用程序,它显示RTL布局而不是当前正确的LTR布局.
该应用程序非常简单,它在工具栏中有一个带有NavigationButton的Activity,当它被翻转时,NavigationButton从左向右移动,具有错误的指向方向.
该应用程序是LTR,仅支持英语,并在英语设备上进行测试,同样的结果发生在模拟器上.我有Android Studio的最终版本.
是什么导致这个问题?因为代码很简单,没有任何硬核.
清单代码:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.corF.app">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:supportsRtl="true"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/AppTheme">
<activity
android:name="com.corF.app.activities.ActivityStartup"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)
我使用的库(SliderLayout)有一个强制应用程序显示RTL的代码.在第一次启动时,SliderLayout强制执行RTL,但在重新打开应用程序而不将其从后台堆栈中完全删除之前,它不会发生变化.
愚蠢的问题,但是,这是解决方案.
| 归档时间: |
|
| 查看次数: |
373 次 |
| 最近记录: |