Hey there,
in my project, I am trying to display tabs at the bottom of the page, as well as on Android as on iOS.
I found out that I can achieve it by adding this line to the xaml.cs:
On().SetToolbarPlacement(ToolbarPlacement.Bottom);
In addition, I want to use icon font for the tab's icons. Therefor, I'm using the FlatTabbedRenderer from this post/example:
(For some reason, I am not able to post the link)
The first problem was, that the example renderer works with TabLayout to set the new drawable icon to it. But when I use toolbar placement at the bottom, the tab elements are not TabLayout elements any more, they are changed to BottomNavigationItemView.
So I had difficulties to address the correct view to change the icons, and I had no idea, which one is the correct Resource Id of the BottomNavigation.
I solved this by writing a workaround, which iterates through all views of the RootView and returns the one of type "BottomNavigationItemView".
Then I changed the UpdateTabbedIcons method to work with those menu items, and everything is fine....
...... until I click one of the tabs. Then, for any reason, the icons of all tabs are not visible anymore.
Has anyone an idea, why the tab's text and icon are disappearing on click?
I will try to upload a sample project that shows this behaviour.
Thanks in advance!