Fix screen orientation

This commit is contained in:
mittorn 2016-05-08 07:59:53 +00:00
parent 0211b8720f
commit e365040659
3 changed files with 8 additions and 2 deletions

View file

@ -65,7 +65,8 @@
</activity>
-->
<activity android:name="in.celest.xash3d.XashActivity"
android:screenOrientation="landscape"
android:screenOrientation="sensorLandscape"
android:configChanges="orientation|screenSize"
android:label="@string/app_name">
<intent-filter>
<action android:name="in.celest.xash3d.START" />

View file

@ -58,6 +58,10 @@ public class XashActivity extends Activity {
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
// landscapeSensor is not supported until API9
if( sdk < 9 )
setRequestedOrientation(0);
// keep screen on
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

View file

@ -74,7 +74,8 @@
</intent-filter>
</activity>-->
<activity android:name="in.celest.xash3d.XashActivity"
android:screenOrientation="landscape"
android:screenOrientation="sensorLandscape"
android:configChanges="orientation|screenSize"
android:label="@string/app_name">
<intent-filter>
<action android:name="in.celest.xash3d.START" />