Friday, November 13, 2009

Removing status and title bars in an Android app

Here are a few options to display the status and title bars in your Android app. The first image shown below is exactly the output you are getting if you do not do any configurations.
To get this output, add this line in the onCreate method:
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
To get this output, add this line in the onCreate method:
requestWindowFeature(Window.FEATURE_NO_TITLE);
To get this output, add these two lines in the onCreate method:
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

0 comments:

Post a Comment