I'm trying to make an android launcher. I want to achieve a completely transparent status bar and navigation bar, here is my theme xml file.
<resources>
<style name="Theme" parent="android:Theme.Material.Wallpaper.NoTitleBar">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowTranslucentNavigation">false</item>
</style>
</resources>
the last two items don't work, there is still a shadow on lollipop.
This is what it looks like(note there is actually a shadow on status bar and navigation bar):
what I want to achieve (nova launcher):
how to make the status bar and navigation bar "transparent" instead of "translucent"?
Best Answer
Update
You can achieve the same effect programmatically on KitKat and afterward by setting the
FLAG_LAYOUT_NO_LIMITS
flag inside theWindow
.If you set a background resource (like a color or a picture) to your layout, you will see the color or picture "below" the status bar.
Original Answer
It looks like
android:windowTranslucentStatus
andandroid:windowTranslucentNavigation
should betrue
instead offalse
Also, your transparent activity / container layout needs this property set:
[Source][1] [1]: https://stackoverflow.com/a/29311321/1549700