Home » Android » android – Hide the status bar

android – Hide the status bar

Posted by: admin June 15, 2020 Leave a comment

Questions:

Please give me solution to hide the status bar of translucant screen, i have tries by setting Theme.NoTitleBar.Fullscreen but it works for normal activity, but its not working for the screen witch is translucant.Please give me the hint to solve the problem.

Thanks

How to&Answers:

That’s how I usually do this by overriding one of standard themes.

<style name="ExampleTheme" parent="android:Theme.Light">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowFullscreen">true</item>
</style>

You then can apply the theme to your activity. I hope that helps.

Answer:

Above solution is not work for me.
I used “@android:style/Theme.Holo.NoActionBar.Fullscreen” as parent theme.

<style name="ExampleTheme" parent="@android:style/Theme.Holo.NoActionBar.Fullscreen">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowFullscreen">true</item>
</style>

https://developer.android.com/training/system-ui/status