android - Make screenOrientation configurable? -
my activity forces portrait mode using android:screenorientation="portrait"
in manifest. however, of users (on tablets default in landscape mode) have asked me make configurable option. possible set orientation in code (without triggering orientation-change animation, before activity displayed)?
yes, call:
activity.setrequestedorientation (int requestedorientation)
taken from
http://developer.android.com/reference/android/app/activity.html#setrequestedorientation%28int%29
if want lock screen orientation after setting it, take @ post:
Comments
Post a Comment