Add sensor-based screen orientation for Android (#2056)

* Adding sensor-based orientation for Android

* Fix indents broken by NotePad++
pull/2059/head
Certainty Witch 5 years ago committed by GitHub
parent 320a595711
commit 6aad1923cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -388,6 +388,8 @@ public class EmulationActivity extends AppCompatActivity implements SurfaceHolde
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT);
else if (orientation.equals("landscape"))
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE);
else if (orientation.equals("sensor"))
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
else
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
}

@ -404,11 +404,13 @@
<item>Use Device Setting</item>
<item>Portrait</item>
<item>Landscape</item>
<item>Sensor Based</item>
</string-array>
<string-array name="settings_emulation_screen_orientation_values">
<item>unspecified</item>
<item>portrait</item>
<item>landscape</item>
<item>sensor</item>
</string-array>
<string-array name="settings_language_entries">
<item>Use Device Setting</item>

Loading…
Cancel
Save