Removing Title in Android Application

In onCreate function:

Between ;

 super.onCreate(savedInstanceState);

and 

 setContentView(R.layout.activity_main);   


add these codes:

 //Remove title bar
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
//Remove notification bar
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
 WindowManager.LayoutParams.FLAG_FULLSCREEN);



Worked for me ;)