title: How to Make Android BottomNavigationView Background Transparent?
body: <p>I have been trying to make the background of the <code>BottomNavigationView</code> transparent so that the background can be seen through it but when I try to set a background color with 0% alpha or a drawable with the same both programmatically and through xml, the background becomes like this:</p>
  <p>BottomNavigationView Background with transparent colors:
  <a href="https://i.stack.imgur.com/Nm7in.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nm7in.jpg" alt="image" /></a></p>
  <p>I want the background completely transparent not like it is shown in the picture.</p>
  <p>Here's the XML for the BottomNavigationView:</p>
  <pre><code>&lt;com.google.android.material.bottomnavigation.BottomNavigationView
      android:id=&quot;@+id/bottom_nav&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;?attr/actionBarSize&quot;
      app:layout_scrollFlags=&quot;scroll|enterAlways&quot;
      android:layout_gravity=&quot;bottom&quot;
      app:menu=&quot;@menu/bottom_nav&quot;
      android:background=&quot;#00000000&quot;
      app:itemBackground=&quot;#00000000&quot;
      app:itemIconTint=&quot;@color/hintcolor&quot;
      app:itemTextColor=&quot;@android:color/white&quot;
      app:itemHorizontalTranslationEnabled=&quot;false&quot;/&gt;
  </code></pre>
  <p>Here's the Code for the Whole XML File:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;.NavigationDrawerActivity&quot;&gt;
  
      &lt;com.google.android.material.appbar.AppBarLayout
          android:id=&quot;@+id/appBarLayout&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:layout_scrollFlags=&quot;scroll|enterAlways&quot;
          android:theme=&quot;@style/AppTheme.AppBarOverlay&quot;&gt;
          &lt;androidx.appcompat.widget.Toolbar
              android:id=&quot;@+id/toolbar&quot;
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;?attr/actionBarSize&quot;
              android:background=&quot;?attr/colorPrimary&quot;
              app:titleTextColor=&quot;?attr/text&quot;
              app:layout_anchor=&quot;@+id/appBarLayout&quot;
              app:layout_anchorGravity=&quot;center&quot;
              app:popupTheme=&quot;@style/AppTheme.PopupOverlay&quot; /&gt;
      &lt;/com.google.android.material.appbar.AppBarLayout&gt;
      &lt;include layout=&quot;@layout/content_navigation_drawer&quot;/&gt;
      &lt;com.google.android.material.bottomnavigation.BottomNavigationView
          android:id=&quot;@+id/bottom_nav&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;?attr/actionBarSize&quot;
          app:layout_scrollFlags=&quot;scroll|enterAlways&quot;
          android:layout_gravity=&quot;bottom&quot;
          app:menu=&quot;@menu/bottom_nav&quot;
          android:background=&quot;#00000000&quot;
          app:itemBackground=&quot;#00000000&quot;
          app:itemIconTint=&quot;@color/hintcolor&quot;
          app:itemTextColor=&quot;@android:color/white&quot;
          app:itemHorizontalTranslationEnabled=&quot;false&quot;/&gt;
  &lt;/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;
  </code></pre>