A blog for technology, SEO tips, website development and open source programming.

Fullscreen mode for previous Android api 8

0 682

The action bar  feature has been introduced in Android 3.0 (API level 11). The purpose is to provide user actions and navigation modes. You can control the behaviour and visibility of the action bar programmatically for Android 3.0 and onwards but what happens with Android 2.2 which action bar is not supported at all.

In order to make the activity full screen mode you need to add the following lines inisde the onCreate method:

@Override public void onCreate (Bundle savedInstanceState) { super.onCreate(savedInstanceState);

//To hide the activity view title programmatically, insert the following line in the onCreatemethod of the main activity:


//To set fullscreen mode, add this one:

getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

setContentView(R.layout.main); }

Leave a Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More