2016-09-22 2 views
1

Ich benutze eine BottomNavigation this, wenn ich versuche, unteren Navigationssymbol Farben mit schwarzem Hintergrund ändern seine Farbe nicht zu ändern.Bottom Navigation Icon Farbänderung

bottomNavigation.setAccentColor(Color.parseColor("#FFE4770A")); 
bottomNavigation.setInactiveColor(Color.WHITE); 
bottomNavigation.setBackgroundColor(Color.BLACK); 

Aber wenn ich es mit Hintergrund versuchte, ändert es Symbolfarbe.

bottomNavigation.setAccentColor(Color.parseColor("#FFE4770A")); 
bottomNavigation.setInactiveColor(Color.WHITE); 

Wie kann es repariert werden? Es ändert die Symbolfarbe mit farbigem Hintergrund.

+1

Versuchen Sie es mit 'setDefaultBackgroundColor()' statt 'setBackgroundColor()' – Mithun

Antwort

1

Gemäß der Dokumentation von ahbottomnavigation Repo, setBackgroundColor() überschreibt die Akzentfarben für Symbole.

ersetzen setBackgroundColor() mit setDefaultBackgroundColor():

bottomNavigation.setDefaultBackgroundColor(Color.BLACK); 
Verwandte Themen