diff options
Diffstat (limited to 'platform/android/java/editor')
3 files changed, 20 insertions, 6 deletions
diff --git a/platform/android/java/editor/src/main/AndroidManifest.xml b/platform/android/java/editor/src/main/AndroidManifest.xml index 0708ffa32f..bae075d929 100644 --- a/platform/android/java/editor/src/main/AndroidManifest.xml +++ b/platform/android/java/editor/src/main/AndroidManifest.xml @@ -29,8 +29,7 @@              android:name=".GodotProjectManager"              android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|density|keyboard|navigation|screenLayout|uiMode"              android:launchMode="singleTask" -            android:resizeableActivity="false" -            android:screenOrientation="landscape" +            android:screenOrientation="userLandscape"              android:exported="true"              android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"              android:process=":GodotProjectManager"> @@ -46,8 +45,7 @@              android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|density|keyboard|navigation|screenLayout|uiMode"              android:process=":GodotEditor"              android:launchMode="singleTask" -            android:resizeableActivity="false" -            android:screenOrientation="landscape" +            android:screenOrientation="userLandscape"              android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">          </activity> @@ -57,8 +55,7 @@              android:label="@string/godot_project_name_string"              android:process=":GodotGame"              android:launchMode="singleTask" -            android:resizeableActivity="false" -            android:screenOrientation="landscape" +            android:screenOrientation="userLandscape"              android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">          </activity> diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.java b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.java index b3a340cc64..8a6bf88267 100644 --- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.java +++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotEditor.java @@ -107,4 +107,18 @@ public class GodotEditor extends FullScreenGodotApp {  		Intent newInstance = new Intent(this, targetClass).putExtra(COMMAND_LINE_PARAMS, args);  		startActivity(newInstance);  	} + +	@Override +	public void setRequestedOrientation(int requestedOrientation) { +		if (!overrideOrientationRequest()) { +			super.setRequestedOrientation(requestedOrientation); +		} +	} + +	/** +	 * The Godot Android Editor sets its own orientation via its AndroidManifest +	 */ +	protected boolean overrideOrientationRequest() { +		return true; +	}  } diff --git a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.java b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.java index 5a0be391cf..12766775a8 100644 --- a/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.java +++ b/platform/android/java/editor/src/main/java/org/godotengine/editor/GodotGame.java @@ -34,4 +34,7 @@ package org.godotengine.editor;   * Drives the 'run project' window of the Godot Editor.   */  public class GodotGame extends GodotEditor { +	protected boolean overrideOrientationRequest() { +		return false; +	}  }  |