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:
parent
3c86b54846
commit
bb7b8e6ee9
1 changed files with 13 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue