Tab bar color using android:TabbedPage.BarItemColor

The following is my code on my Main Page Tabbed Page placed at the top. When I preview in android emulator however, the tab bar text shows up as white. When I click it does change to blue though. Any ideas why this would be happening?

Thanks!

        android:TabbedPage.ToolbarPlacement="Bottom"
        android:TabbedPage.BarItemColor="Black"
        android:TabbedPage.BarSelectedItemColor="Blue"

Answers

  • NMackayNMackay GBInsider, University mod

    @mpoblacion92 said:
    The following is my code on my Main Page Tabbed Page placed at the top. When I preview in android emulator however, the tab bar text shows up as white. When I click it does change to blue though. Any ideas why this would be happening?

    Thanks!

            android:TabbedPage.ToolbarPlacement="Bottom"
            android:TabbedPage.BarItemColor="Black"
            android:TabbedPage.BarSelectedItemColor="Blue"
    

    What type of device? is your project a template one? Tested with 3.4.0 stable & Oreo & Pie emulators and Hardware Samsung S6 and couldn't replicate.

    It's worth checking what theme your Android platform specific is using etc. Repo would help.

  • NickANickA USMember ✭✭

    This was happening to me until I specifically set the background color.

                BarBackgroundColor="Silver"
                xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
                android:TabbedPage.ToolbarPlacement="Bottom"
                android:TabbedPage.BarItemColor="Green"
                android:TabbedPage.BarSelectedItemColor="Blue"
                android:TabbedPage.IsSwipePagingEnabled="False"
    
  • mpoblacion92mpoblacion92 Member ✭✭

    Hey @NickA, unfortunately didn't work for me. Thanks for the advice though.

    @NMackay, the device is one of the built in Pixel XL Using Oreo/Pie emulators. . The project is a templated one [Multiplatform Tabbed].. I'm a noobie with Xamarin/android. How would I go about checking my android theme? Also, new to this site, it threw errors saying I was too new to post links when trying to share my git repo.

Sign In or Register to comment.