Is there anyway to permanently remove this actionbar? I tried these two ways but they didn't work:
this ..
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
and this ...
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
That is not the ActionBar
it is called the Status bar
in android. Because it persists the status of some important utilities like your network and battery status.
Coming to your question.
FOR Android 4.0 and Lower
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
FOR Android 4.1 and Higher
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
//if you have action bar present make sure to hide it
ActionBar actionBar = getActionBar();
actionBar.hide();