How to Hide Title Bar In AndroidHow to Hide Title Bar In Android

Hide Title Bar of an activity In Android.

Answer 1

Hide title bar in activity.
   
public class MainActivity extends Activity 
{

      @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);

              setContentView(R.layout.activity_main);
        
      }
}

SUBMIT YOUR ANSWER

  |  
 
 
 

Preview :