Android: Remove titlebar and make your app completely fullscreen

0 Comments

If you're not entirely fond of the WYSIWIG layout creator and prefer to do things with code, use the following snippet to make the app full screen.

01.public class SlowPokeActivity extends Activity {
02.  @Override
03.  public void onCreate(Bundle savedInstanceState) {
04.    super.onCreate(savedInstanceState);
05. 
06.    // Make it completely full screen
07.    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
08.    this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
09.  }
10.}
 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog