I want to make the navigation bar fully transparent in my app. I have tried the other answers, but they only make the status bar fully transparent and the navigation bar still has a dark half-transparent color. Here is my code:
styles.xml:
<style name="AppTheme" parent="android:Theme.Material.Light.NoActionBar">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
Activity.java:
getWindow().setFlags(
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
Here is the result I'm trying to get: goal
and here is the result I'm currently getting: result
Is there any way to achieve a fully transparent navigation bar?
Try to set
<item name="android:android:windowTranslucentStatus">true</item>
setandroid:statusBarColor
to@android:color/transparent
.Then add code below:
If you also want the navigation bar to be translucent, set
android:navigationBarColor
to@android:color/transparent
and combine the flagView.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
as well.Try it may it will work.