Is there a way I can start activity in a specific orientation (programmatically) without having it to be recreated again? Right now if I call setRequestedOrientation from the the OnCreate and the orientation is different than the current then the activity is destoryed and restarted again.
Thank you
For me solution was to lock orientation of Activity
android:screenOrientation="locked"
, and now it depends only on setRequestedOrientation():
<activity android:name=".SomeActivity"
android:label="@string/app_name"
android:screenOrientation="locked">
No restarting anymore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With