Home > Android, Android how to > Making an fullscreen Activity in Android

Making an fullscreen Activity in Android


We moved. Please visit this link for this post.

 

 

 

There are 2 ways how to make an fullscreen activity. One from code other from AndroidManifest.xml. I am going to show both of them.
From code:

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE);

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

...

At first we hide the title bar, then we make an activity fullscreen.

From AndroidManifest.xml:

<activity android:name=" "

...

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

under <activity>.

Both these variants make an fullscreen activity.

About these ads
Categories: Android, Android how to
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: