Sometimes it is problem, that SVG icons in BottomNavigationView seems to not show full content of the icon. For examle we have an icon:

 

I import it into Android as Vector Asset and add it to bottom navigation view component and run the application. In application I see such view:

It seems, that not all picture content is displayed in the application. There is not check symbol in circle.

Android by default in bottom navigation view compoent all SVG object displays in white color. The check symbol object is in the circle but his color is converted to white and so it has became invisible.

One solution is to redraw the SVG image. But sometimes it is not posible. The other solution is to tell the bottom navigation view to display original picture colors. You can do it in the activity code setting:

bottomNavigationView.setItemIconTintList(null);

After this fix  the icon is dispayed correctly:

But there could be some problems if there are other colors than white and black in the image. Then the picture is displayed in the colors that they are specified:

Comments powered by CComment