Fix screen orientation
This commit is contained in:
parent
0211b8720f
commit
e365040659
3 changed files with 8 additions and 2 deletions
|
@ -65,7 +65,8 @@
|
||||||
</activity>
|
</activity>
|
||||||
-->
|
-->
|
||||||
<activity android:name="in.celest.xash3d.XashActivity"
|
<activity android:name="in.celest.xash3d.XashActivity"
|
||||||
android:screenOrientation="landscape"
|
android:screenOrientation="sensorLandscape"
|
||||||
|
android:configChanges="orientation|screenSize"
|
||||||
android:label="@string/app_name">
|
android:label="@string/app_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="in.celest.xash3d.START" />
|
<action android:name="in.celest.xash3d.START" />
|
||||||
|
|
|
@ -58,6 +58,10 @@ public class XashActivity extends Activity {
|
||||||
WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// landscapeSensor is not supported until API9
|
||||||
|
if( sdk < 9 )
|
||||||
|
setRequestedOrientation(0);
|
||||||
|
|
||||||
// keep screen on
|
// keep screen on
|
||||||
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
|
||||||
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
|
|
@ -74,7 +74,8 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>-->
|
</activity>-->
|
||||||
<activity android:name="in.celest.xash3d.XashActivity"
|
<activity android:name="in.celest.xash3d.XashActivity"
|
||||||
android:screenOrientation="landscape"
|
android:screenOrientation="sensorLandscape"
|
||||||
|
android:configChanges="orientation|screenSize"
|
||||||
android:label="@string/app_name">
|
android:label="@string/app_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="in.celest.xash3d.START" />
|
<action android:name="in.celest.xash3d.START" />
|
||||||
|
|
Loading…
Add table
Reference in a new issue