I have disabled screen rotation in one activity in particular time. Now I need that particular time it will be enabled. How can I enable rotation, when i disabled it using this: ?
You can use this
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
See the official documentation for more details
Check out also that you don't have this line in your manifest file for your activity:
android:screenOrientation="portrait"
That will disable the rotate of the screen.
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