Android: How do I make sure the screen has fully rotated?
<p>I am writing an Android application that needs to rotate the screen as many times as possible in a certain period of time. </p>

<p>I can rotate the screen fine with setRequestedOrientation(int). The problem I am having is that if I try and rotate the screen in the last call to Activity, onWindowFocusChanged(boolean), the screen cannot keep up with the amount of times  setRequestedOrientation is called. </p>

<p>My logcat is showing me that I am getting roughly 5-10 "Setting rotation to [0|1|2|3]" before I get one complete screen rotation.</p>

<p>Here's what I have tried:</p>

<ul>
<li>Using view to request focus and using a OnRequestFocusChanged Listener</li>
<li>Rotating screen in a child thread to run runOnUiThread to add to main thread message queue</li>
<li>View.post</li>
</ul>

<p>I know iv'e tried other stuff, but I forget, those are the most recent, and as you can tell I'm getting desperate.</p>

<p>So, is there a way to make sure that the Activity has fully rotated and is accepting user input? Maybe there is a way to check and see if the Activity is looping and waiting for input? Any help here would be absolutely great! Thanks guys.</p>
