1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: use “userLandscape” or “sensonLandscape” screen orientation for Android if available.

This commit is contained in:
Lukasz Kozakiewicz 2017-11-07 12:39:21 +01:00
parent 3c86b54846
commit bb7b8e6ee9

View file

@ -1576,7 +1576,19 @@ private:
}
}
setAttributeIfNotPresent (*act, "android:screenOrientation", androidScreenOrientation.get());
if (androidScreenOrientation.get() == "landscape")
{
String landscapeString = androidMinimumSDK.get().getIntValue() < 9
? "landscape"
: (androidMinimumSDK.get().getIntValue() < 18 ? "sensorLandscape" : "userLandscape");
setAttributeIfNotPresent (*act, "android:screenOrientation", landscapeString);
}
else
{
setAttributeIfNotPresent (*act, "android:screenOrientation", androidScreenOrientation.get());
}
setAttributeIfNotPresent (*act, "android:launchMode", "singleTask");
auto* intent = getOrCreateChildWithName (*act, "intent-filter");