Search code examples
androidandroid-layoutbottomnavigationviewandroid-developer-apiandroid-bottomnavigationview

BottomNavigationView - Android Studio


I have used images as icon but I dont want them to look grey when they are not selected. It should look same as picture whether its active or not. What should I do?

com.google.android.material.bottomnavigation.BottomNavigationView

Thanks ScreenShot


Solution

  • Try using this in your XML file in the BottomNavigationView part

    app:itemIconTint="null"
    

    Or add this to your java file after defining your BottomNavigationView (with the findViewById)

    //Replace BottomNavView with your nav bar id
    BottomNavView.setItemIconTintList(null);