This must be possible with 4.4, but I found no documentation on this yet - anyone knows how to make the status-bar / system-ui transparent/translucent ?
3 Answers
Using one of the built-in themes precludes you from having an ActionBar
.
Translucent system bars
You can now make the system bars partially translucent with new themes,
Theme.Holo.NoActionBar.TranslucentDecor
andTheme.Holo.Light.NoActionBar.TranslucentDecor
. By enabling translucent system bars, your layout will fill the area behind the system bars, so you must also enablefitsSystemWindows
for the portion of your layout that should not be covered by the system bars.If you're creating a custom theme, set one of these themes as the parent theme or include the
windowTranslucentNavigation
andwindowTranslucentStatus
style properties in your theme.
If you wish to have transparent status bar, and transparent navigation with the use of an Action Bar - then simply add the following to your custom theme (in values-v19/styles.xml)
<style name="Theme.MyTheme" parent="Theme.MyTheme.Base">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
-
45+1 because You wrote it and I can just copy/paste ! – Stephane Mathis Jan 31 '14 at 20:48
-
Just to clarify, this works with on API Level 19+. – Joshua Pinter Apr 21 '16 at 16:42
Here you go - http://developer.android.com/about/versions/android-4.4.html#UI
Translucent system bars
You can now make the system bars partially translucent with new themes, Theme.Holo.NoActionBar.TranslucentDecor and Theme.Holo.Light.NoActionBar.TranslucentDecor. By enabling translucent system bars, your layout will fill the area behind the system bars, so you must also enable fitsSystemWindows for the portion of your layout that should not be covered by the system bars.
If you're creating a custom theme, set one of these themes as the parent theme or include the windowTranslucentNavigation and windowTranslucentStatus style properties in your theme.

- 4,776
- 2
- 26
- 48
I found no documentation on this yet
Hmmmm...
http://developer.android.com/about/versions/kitkat.html#44-immersive
To get the most impact out of your content, you can now use new window styles and themes to request translucent system UI, including both the status bar and navigation bar. To ensure the legibility of navigation bar buttons or status bar information, subtle gradients is shown behind the system bars. A typical use-case would be an app that needs to show through to a wallpaper.
http://developer.android.com/about/versions/android-4.4.html#UI
You can now make the system bars partially translucent with new themes, Theme.Holo.NoActionBar.TranslucentDecor and Theme.Holo.Light.NoActionBar.TranslucentDecor. By enabling translucent system bars, your layout will fill the area behind the system bars, so you must also enable fitsSystemWindows for the portion of your layout that should not be covered by the system bars.
If you're creating a custom theme, set one of these themes as the parent theme or include the windowTranslucentNavigation and windowTranslucentStatus style properties in your theme.

- 1
- 1

- 986,068
- 189
- 2,389
- 2,491