Android Notes: Full screen applications

Just a quick note on how to make an Activity run full-screen. Simply insert this magic into the Activity’s OnCreate()

super.onCreate(savedInstanceState);
/* ... etc ... */
requestWindowFeature(Window.FEATURE_NO_TITLE); 
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN );
/* ... rest of code ... */

You need this if playing with OpenGL ES, otherwise the screen doesn’t scale correctly.

About James

I'm just a person who likes writing software in their spare time. I'm not an "indie games developer" and am not trying to escape my day job and live in the happy world of games dev. I'm more like one of those people that used to write games in their spare time in the 80s. My stuff would be PD or Shareware if this were the 80s or 90s. It's good to comment on the posts in here :)