Reputation: 9599
In my onCreate() method, I use this code to remove the status bar:
// Remove the status bar from the top
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Yet when I start up the app, I can still see the status bar for like a second. How can I prevent this?
Upvotes: 0
Views: 236
Reputation: 15701
you must use requestWindowFeature before setting the content view
Upvotes: 1
Reputation: 7184
Add the following attribute to the activity in the manifest:
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
Upvotes: 1