I want to hide the action bar on my charging screen but it's not an activity, it's just a layout over an activity.
Try to call getSupportActionBar().show(); or getSupportActionBar().hide(); in your activity every time you want to show or hide your layout
ActionBar actionBar = getSupportActionBar();
if (actionBar != null){
actionBar.show();
//actionBar.hide();
}
You can find more info about how to hide Android ActionBar here