Search code examples
androidkotlinbottomnavigationview

bottom navigation selected item highlight


I have a problem with bottom navigation menu in android with kotlin I can't disable icon highlight for selected item , any body can help me ?

enter image description here

I searched web but I can't find any solution for hide highlight around icon in bottom navigation menu


Solution

  • if you using xml:

    val bottomNavigationView: BottomNavigationView = findViewById(R.id.bottomNavigationView)
    bottomNavigationView.itemActiveIndicatorColor = getColorStateList(R.color.black)
    

    for compose set color of NavigationBarItem:

    colors = NavigationBarItemDefaults.colors(indicatorColor = Color.Black)