I have tried everything mentioned below but still not able to get rid of the Status Bar.
The LinearLayout in the layout xml has fill_parents for both vertical and horizontal attributes
Manifest :
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
Activity :
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
EDIT :
The solution works if I add the android theme(android:theme=”@android:style/Theme.NoTitleBar.Fullscreen”) to application node rather than at the activity level in the manifest file. Why could it be so? what if I need this full screen behaviour for only one of the activities?
try like this..