Hiding android notification bar in actity
<p>I need the code to show and hide the notification bar during an activity.</p>

<p>I try this code:</p>

<pre><code>public void goFullscreen() {
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
    this.findViewById(android.R.id.content).requestLayout();
}

public void goNonFullscreen() {
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
    getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    this.findViewById(android.R.id.content).requestLayout();
}
</code></pre>

<p>This doesn't work after the content is adding...</p>
