How to make your application FullScreen? or How to hide the Title-Bar in ANDROID?

By | April 3, 2011

This simple example makes your activity full screen by hiding the Title-Bar and gives more space for your application.

package pack.FullScreenActivity;

import android.app.Activity;
import android.os;
import android.view.Window;
import android.view.WindowManager;

public class FullScreenActivity 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);
    }
}

ANDROID Full screen example

ANDROID Full screen example

;

2 thoughts on “How to make your application FullScreen? or How to hide the Title-Bar in ANDROID?

  1. Russ Abraham

    A friend of mine just emailed me one of your articles from a while back. I read that one a few more. Really enjoy your blog. Thanks

    Reply
  2. coder1

    Thank you, Russ Abraham
    This is an encouragement for me for future posts.!!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *