3

My app has a black bar over these home buttons and i need them to look transparent like below

enter image description here

Alpoe
  • 277
  • 1
  • 4
  • 16
  • This should help you. [https://stackoverflow.com/questions/29069070/completely-transparent-status-bar-and-navigation-bar-on-lollipop](https://stackoverflow.com/questions/29069070/completely-transparent-status-bar-and-navigation-bar-on-lollipop) – Bryan Aug 04 '17 at 11:14

3 Answers3

9

set style to your main theme like below code

<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">true</item>
        <item name="android:windowTranslucentNavigation">true</item>
    </style>
</resources>
sunita
  • 470
  • 1
  • 6
  • 22
2

To do that inside of an App I used this into styles.xml

 <item name="android:windowTranslucentNavigation">true</item>
 <item name="android:windowTranslucentStatus">true</item>
 <item name="android:fitsSystemWindows">true</item>
akhilesh0707
  • 6,709
  • 5
  • 44
  • 51
0

set navigationBarColor to change color.

Check here to see flags required to mention. If color is opaque then there is different set of flags else another set of flags.

void setNavigationBarColor (int color) Blockquote

Sets the color of the navigation bar to . For this to take effect, the window must be drawing the system bar backgrounds with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS and FLAG_TRANSLUCENT_NAVIGATION must not be set. If is not opaque, consider setting SYSTEM_UI_FLAG_LAYOUT_STABLE and SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION.

The transitionName for the view background will be "android:navigation:background".

seema
  • 991
  • 1
  • 13
  • 27