Reputation: 758
I sit with the problem. Here's the thing. I am writing an application to display pdf files.
The process of rendering files, runs parallel to the main stream. For very frequent turns the screen comes a time when all the objects in my class application become null.
how do I disable screen rotation and wait for the completion of rendering the page?
I tried used
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR); setActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
but in setting the screen SCREEN_ORIENTATION_SENSOR, the screen orientation is changed several times
Upvotes: 1
Views: 78
Reputation: 86948
Here is the same question, the different answers work for one activity or the entire app: How to disable orientation change in Android?
Upvotes: 2