I am testing my experimental launcher app, and using a customer button, I am trying to lock the orientation of the device by calling the following code:
mainActivity.RequestedOrientation = ScreenOrientation.Locked;
but it only works just for the launcher app. It does not change the lock on the orientation of the device as a whole. And if I open some other app, the orientation gets unlocked.
Any solution /tips will be helpful.
↧
How to lock orientation of a device programmatically
↧