Cropped buttons and FLAG_FULLSCREEN interaction?
<p>I have some buttons created programatically on a full screen layout. That is to say I have the following code at the start of my activity.</p>

<pre><code>public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
</code></pre>

<p>.. so the activity starts up and I create the buttons. All looks fine, the buttons appear exactly the right size and where I expect on the screen (right at the bottom) and with text centred perfectly within the button.</p>

<p>The problem then occurs when I use an intenet to call up some other ectivity then later return back to the original. At this point when my screen is redrawn, you can notice a slight jiggle as if the screen had been drawn slightly offset and then quickly repositioned. The resulting final screen looks mostly ok except the the buttons along the bottom appear cropped.</p>

<p>This is happening on my samsung galaxy SII, but there is no noticeable problem on my galaxy tab 10.1. There is also no problem on either device if I comment out these lines:</p>

<pre><code>getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
</code></pre>

<p>You can see the cropped buttons here:</p>

<p><img src="http://i.stack.imgur.com/oRdTz.jpg" alt="enter image description here"></p>

<p>Has anyone had a similar problem? If so how was it resolved?</p>

<p><strong>EDIT:</strong> My gut feeling is that somehow the status bar is only being removed slowly and somehow the button is being positioned on the screen while the screen is still in the process of being slid upwards as the status bar disappears... but maybe this idea is a red herring.</p>
