[BottomNavigationView] Weird background using Material 1.1.0 and Navigation component
See original GitHub issueI am using some BottomNavigationViews with transparent background in my app and It was working really well but I had to add budgets to my BNV so I added com.google.android.material:material:1.1.0 stable version
Now my BNV has some weird shadow/background behind and it looks really bad and it’s happening everywhere.
This is on emulator but on a real device is even worst. It has trapeze form.
I am using:
minSdkVersion 26
targetSdkVersion 29
navigation_version 2.2.0
material_version 1.1.0
And my BNV is:
android:id="@+id/topNavigationView"
style="@style/SearchBottomMenu"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="#00000000"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/autoTv"
app:menu="@menu/search_nav_menu" />
This is the style:
<style name="SearchBottomMenu">
<item name="itemIconTint">@drawable/nav_item_color_state_dark</item>
<item name="itemTextColor">@drawable/nav_item_color_state_dark</item>
<item name="android:paddingTop">@dimen/padding_nano</item>
</style>
and this is the menu
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/trendingSearchFragment"
android:icon="@drawable/ic_trending"
android:title="Tendencias" />
<item
android:id="@+id/mySearchesFragment"
android:icon="@drawable/ic_my_preferences"
android:title="Favoritos" />
<item
android:id="@+id/favoriteSearchFragment"
android:icon="@drawable/ic_my_search"
android:title="Mis busquedas" />
</menu>
if I remove android material 1.1.0 and not excluding material 1.0.0 from navigation component it just looks perfect.
Thanks for any help.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:10 (1 by maintainers)
Top Results From Across the Web
android - BottomNavigationView inside a BottomAppBar with ...
The workaround is to set a background in the xml which is neither null or a ColorDrawable. I created my own drawable, which...
Read more >How to Customize Background Shape Bottom Navigation ...
CustomShape # BottomNavigationView #AndroidStudio #Modern Hi everyone, I am @Abdul Aziz Ahwan . In this video, we are going to Learn How do...
Read more >Bottom Navigation View Using Jetpack Navigation Component
... video we will learn to implement a bottom navigation view with jetpack navigation component. Bottom Navigation View is a material comp...
Read more >Hands-on with Material Components for Android: Bottom ...
The Bottom Navigation bar is a top-level navigation component. It displays three to five destinations, each with an icon and an optional text...
Read more >No Materialcardview Background In Darkview - ADocLib
For some time the bottom navigation view missed some crucial features mostly related to menuItemId menuItemId { return mainScreen } } return null...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The point was
app:elevation="0dp"
. Notandroid:elevation="0dp"
Yea, what you’re seeing is the shadow behind your transparent BottomNavigationView. If you set
app:elevation="0dp"
on your BottomNavigationView, you should get what you’re looking for.