Skip to content

Commit

Permalink
Projucer: use “userLandscape” or “sensonLandscape” screen orientation…
Browse files Browse the repository at this point in the history
… for Android if available.
  • Loading branch information
lukaszkozakiewicz committed Nov 7, 2017
1 parent 3c86b54 commit bb7b8e6
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,19 @@ class AndroidProjectExporter : public ProjectExporter
}
}

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");
Expand Down

0 comments on commit bb7b8e6

Please sign in to comment.