how to hide status bar from activity in android studio code example
Example 1: how to remove status bar in android
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
Example 2: how hide status bar in android studio
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);