What do I add to themes.xml to change the navigation bar to be more transparent? I can't find documentation for it anywhere. Thanks!
Creating a transparent navbar is very easy - just don't add a color class . bg-* to the navbar. In this case, the Navbar will take the color of the parent's background color.
Using the Show and hide button at the left side of the navigation bar, you can set the navigation bar to be hidden or pinned on the screen when you use apps or features. The navigation bar is pinned by default.
There are two ways to style the navigation bar depends on how you create it. One is using the XML style file if you create the navigation bar from XML. The other one is to change it using code.
In your theme add the following line:
<item name="android:windowTranslucentNavigation">true</item>
Romain Guy has published a nice sample app that uses this API. Maybe it will help. (You might need to refactor some code since the project was originally written using the Android L developer preview).
Alex's answer is correct. You can use
<item name="android:windowTranslucentNavigation">true</item>
Another option is to use
<item name="android:windowBackground">@android:color/transparent</item>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With