我正在创建一个 android 游戏,其中每个活动都设置为 xml 清单文件中的横向。
但是,有时在进行新活动时,它会以纵向闪烁一秒钟,然后再校正为横向。
有没有人有任何一般性的原因?
它发生在使用 ScheduledFuture 过早退出关卡完成屏幕时
谢谢安迪
编辑(清单):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appsolutely.sheepherder"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.appsolutely.sheepherder.Main"
android:label="@string/app_name"
android:screenOrientation="landscape" >
</activity>
<activity
android:name="com.appsolutely.sheepherder.Game"
android:label="@string/title_activity_game"
android:screenOrientation="landscape" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.appsolutely.sheepherder.LevelSelect" />
</activity>
<activity
android:name="com.appsolutely.sheepherder.LevelSelect"
android:label="@string/title_activity_level_select"
android:screenOrientation="landscape" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.appsolutely.sheepherder.Main" />
</activity>
<activity
android:name="com.appsolutely.sheepherder.Splash"
android:label="@string/app_name"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.appsolutely.sheepherder.Plague"
android:label="@string/title_activity_plague"
android:screenOrientation="landscape" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.appsolutely.sheepherder.Main" />
</activity>
</application>