Sharanabasu Angadi
Sharanabasu Angadi

Reputation: 4382

Make AlertActivity full screen in android

How to make AlertActivity full screen in android

basically AlertActivity is an Activity which implements DialogInterface ref

Upvotes: 1

Views: 462

Answers (5)

Bhanu Sharma
Bhanu Sharma

Reputation: 5145

In activity oncreate() method, you can write like this:

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

In manifest, you can write this that particular activity to set theme:

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

Upvotes: 1

Hafiz.M.Usman
Hafiz.M.Usman

Reputation: 231

just add this in your Menifest activity tag which you want to be full screen

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

Upvotes: 0

Mr. Borad
Mr. Borad

Reputation: 391

use this on your onCreate method

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

Upvotes: 0

Pihu
Pihu

Reputation: 1039

Try this on your onCreateDialog() method:

Dialog dialog=new Dialog(this,android.R.style.Theme_Dark_NoTitleBar_FullScreen)

Upvotes: 0

jyomin
jyomin

Reputation: 1967

In the manifest file inside your activity tag add this line

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

Upvotes: 0

Related Questions