#StackBounty: #xamarin #xamarin.forms How can I change the background color of the Android tab with a renderer, while using a custom re…

Bounty: 500

I create a custom renderer to add some side padding to the tabs on Android:

public class MarginedTabBarAppearance : IShellBottomNavViewAppearanceTracker
{
    public void Dispose()
    {
    }

    public void SetAppearance(BottomNavigationView bottomView, IShellAppearanceElement appearance)
    {
        if (App.devWidth == SIZE.L)
            bottomView.SetPadding(400, 0, 400, 0);
    }

    public void ResetAppearance(BottomNavigationView bottomView)
    {
    }
}

Unfortunately this also has a side effect in that it sets the background color to white.

Does anyone have any knowledge of how I use this renderer and also change the background color?


Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.