Android BottomNavigationView One tab with different unselected/selected colors
Since you have access to the bottom navigation view, you can just "redraw" your bottom toolbar every time you switch pages. We did something similar and didn't notice any performance issues.
You will first want to monitor page changes by subscribing to page change inside OnElementChanged
Element.CurrentPageChanged += ElementOnCurrentPageChanged;
Then inside ElementOnCurrentPageChanged
you can traverse each page and get the menu item for that page
private void UpdateTabbedIcons()
{
for (var i = 0; i < Element.Children.Count; i++)
{
var tab = _bottomNavigationView.Menu.GetItem(i);
var element = Element.Children[i];
if (element is NavigationPage navigationPage)
{
//if the child page is a navigation page get its root page
element = navigationPage.RootPage;
}
UpdateTabIcon(tab, element);
}
}
In our case we used font icons so we drew the icons and set the colors every time.
public void UpdateTabIcon(IMenuItem menuItem, Page page)
{
var icon = page?.Icon?.File;
if (icon == null) return;
var drawable = new IconDrawable(Context, "FontAwesome.ttf", icon).SizeDp(20);
var element = Element.CurrentPage;
if (element is NavigationPage navigationPage)
{
//if the child page is a navigation page get its root page
element = navigationPage.RootPage;
}
if (element == page)
{
drawable.Color(BarSelectedItemColor.ToAndroid());
}
else
{
drawable.Color(BarItemColor.ToAndroid());
}
menuItem.SetIcon(drawable);
}
We also had to override OnAttachedToWindow to make sure the icons were redraw when returning to the app from different states.
protected override void OnAttachedToWindow()
{
UpdateTabbedIcons();
base.OnAttachedToWindow();
}
You will have to modify this some to fit your use case but I think this method should accomplish what you are looking for.