[TabbedPage] Change colors of tabs in Android

FranciscoGGFranciscoGG ESMember ✭✭
edited July 2015 in Xamarin.Forms

Depending on the Android theme, the tabs are showing with different background and text colors.

What is the best way of customize the tabs colors?

Thanks :)

Best Answer

Answers

  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭

    I am eager to know as well! :smiley:

  • TorbenKruseTorbenKruse DEMember ✭✭✭

    Do this.

    You can also use this and this to create your styles if you are not too familar with it.

  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭

    @NMackay @TorbenKruse @FranciscoGG

    Don't mean to hijack this thread, but I feel its related. Is there any way to update these style colors from code at runtime. IE for ListView selected item color and Tabbed Page's selected page indicator. I've spent so much time trying even with customer renders and haven't been able to achieve.

    Thanks!

  • David.7347David.7347 USMember

    This works for me...

    namespace AppAOT
    {
    public partial class MainPage : TabbedPage
    {
    public MainPage()
    {
    InitializeComponent();

            var c = Color.FromHex("#c3c3c3");
            this.BarBackgroundColor = c;
    
        }
    }
    

    }

  • CarlosMoralesCarlosMorales PRMember

    David.7347 Solution works for me too!!

    @David.7347 said:

    This works for me...

    namespace AppAOT
    {
    public partial class MainPage : TabbedPage
    {
    public MainPage()
    {
    InitializeComponent();

            var c = Color.FromHex("#c3c3c3");
            this.BarBackgroundColor = c;
            
        }
    }
    

    }

    This work for me too.. Thanks

  • MannyVSMannyVS USMember ✭✭

    Hi Every one,

    i have the tab text color as green when it is selected and when unselected its grey.
    So, in the same way Is there a way to apply the same to the image.

    Please, let me know.
    Appreciate your response.

Sign In or Register to comment.