I'm developing an app that only some pages can be displayed on landscape orientation, I do not want to lock the screen on display, I wish to deny Android do a orientation change.
There's something that I can use for it? Like, at runtime on orientation change, Android asks if it's possible to go to that orientation?
If there's not, how can I lock the current screen orientation? I know that setRequestedOrientation can do that, but it implies in discover the current orientation (and even discover the correct orientation like 'normal' or 'inverse' portraits/landscapes) and lock to it.
EDIT: There's only ONE activity on this app, and based on it's state (that changes trough time and user input) it can be rotated or not, that is my problem.
As seen at http://developer.android.com/guide/topics/resources/runtime-changes.html about configuration changes:
"Handle the configuration change yourself Prevent the system from restarting your activity during certain configuration changes, but receive a callback when the configurations do change, so that you can manually update your activity as necessary."
Even with that the configuration changes, I wish to block this behavior before that.