How to Make an Activity Fullscreen

8 votes · 6 comments

This code makes the current Activity Full-Screen. No Status-Bar or anything except the Activity-Window!

raw ·
copy
· download
public class FullScreen extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); } }
Add a comment

6 Comments

Alternatively you can add

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

to AndroidManifest.xml under

Reply · May 28, 2009, 10:54 p.m.

Thank you :)

Reply · March 22, 2011, 10:35 a.m.

Many thanks !

Reply · Aug. 22, 2009, 12:06 a.m.

hei how to insert this patch to android? can u please give me the tutorial and what tools I need,,,,

Reply · March 10, 2011, 3:51 p.m.

I hope you will like my recommendation,More information can be found online at http://www.fashionmaternitydress.com http://www.bangaccessory.com http://www.petaccessoryonline.com

Reply · Jan. 13, 2012, 8:02 a.m.

Wow, so well. I consider computer programming is hard for me. Do you use language of C? http://www.topckit.com

Reply · Jan. 18, 2012, 2:12 p.m.