如何在Xamarin.Forms- Android的TabbedPage-BottomNavigation栏中删除BarItemColor和SelectedBarItemColor?

问题描述

我将Xamarin.Forms TabbedPage的BottomNavigation Bar的(android)Selected选项卡的图标更改为带有Customrenderer的图标,改为未选择时显示彩色版本。但是由于该图标具有认的SelectedBarItemColor,因此它使用的是SelectedBarItemColor而不是原始颜色。如何保留图标的原始颜色并摆脱该SelectedBarItemColor

enter image description here

解决方法

我可以通过在CustomRenderer中添加以下行来解决此问题

bottomNavigationView.ItemIconTintList = null;