Browse Source

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

tags/2021-05-28
Lukasz Kozakiewicz 8 years ago
parent
commit
bb7b8e6ee9
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h

+ 13
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h 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");


Loading…
Cancel
Save