I am currentlky trying to hide and show my application in Fullscreen.
I started a new FullScreenActivity according to the Eclipse templates.
This is the code I use to show / Hide the ActionBar + NotificationBar
public void hide() {
if ((mFlags & FLAG_FULLSCREEN) != 0) {
mActivity.getSupportActionBar().hide();
mActivity.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
mOnVisibilityChangeListener.onVisibilityChange(false);
mVisible = false;
}
public void show() {
if ((mFlags & FLAG_FULLSCREEN) != 0) {
mActivity.getSupportActionBar().show();
mActivity.getWindow().setFlags(0,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
mOnVisibilityChangeListener.onVisibilityChange(true);
mVisible = true;
}
It kinda work but my big issue is that the ActionBar is overlapped by notifications:

Any idea on what is wrong?
Self answer:
I had to remove these lines that were automatically generated in the template: