How to Hide ActionBar and Tittle from Android App

@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);//int flag, int mask 
      
        setContentView(R.layout.activity_main);  
          
    }

You can use according to you that if you want to hide Action Bar then use

this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                  WindowManager.LayoutParams.FLAG_FULLSCREEN);

else you can hide tittle by using this code –

requestWindowFeature(Window.FEATURE_NO_TITLE);

 

Leave a Reply

Your email address will not be published. Required fields are marked *