简体   繁体   中英

How to DISABLE status bar in Android?

I want to disable status bar in my application. link

with:

    requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                     WindowManager.LayoutParams.FLAG_FULLSCREEN);

I still can activate status bar with fast swipe from top to bottom screen. Is possible to fully deactivate it?

What API version are you using? Anyway in the dedicated android developers page ( Hiding the Status Bar ) there is a detailed explanation on how to do it with additional clarification for API<16. In particular if the status bar should always remain hidden in your app you should set the activity theme in your app's manifest file as follows:

<application
    ...
    android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" >
    ...
</application>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM