Mitul Nakum
Mitul Nakum

Reputation: 5574

how to remove statusbar animation when changing to fullscreen in Android

when i change my activity to fullscreen, the statusbar performs an animation,but not disappear immediately. so how can i make the statusbar disappear immediate ? if need to change framework , where is it?

Upvotes: 4

Views: 4898

Answers (2)

Mitul Nakum
Mitul Nakum

Reputation: 5574

I have found solution.

we can out following code in activity from which we are creating and starting Intent

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Intent scanIntent = new Intent(this, SecondActivity.class);
startActivity(scanIntent);

By this it will hide status bar first then it will move to next activity.

Above code will require only when you are using single instance for second activity. else you can apply solution given by Vineet Shukla

Upvotes: 2

Vineet Shukla
Vineet Shukla

Reputation: 24031

try android:theme="@android:style/Theme.NoTitleBar.Fullscreen" in the activity tag in your manifest file.

Edit:

Use requestWindowFeature(Window.FEATURE_NO_TITLE) in your onCreate() before you call setContentView () to set programmatically.

Upvotes: 3

Related Questions