Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Change tab colour in TabbedPage on Android

$
0
0

I've tried everything and nothing ever worked.

  <style name="MyActionBar">
    <item name="android:background">#ff0000</item>
    <item name="android:backgroundStacked">#ff0000</item>
  </style>
  <style name="MyActionBarTab" parent="android:Widget.ActionBar.TabView">
    <item name="android:background">#0000ff</item>
    <item name="android:backgroundStacked">#0000ff</item>
  </style>

  <style name="Your.TabWidget" parent="@android:style/Widget.Holo.TabWidget">
    <item name="android:background">#0000ff</item>
    <item name="android:backgroundStacked">#0000ff</item>
  </style>

  <style name="LightTheme" parent="android:Theme.Holo">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
    <item name="android:actionBarTabStyle">@style/MyActionBarTab</item>
    <item name="android:tabWidgetStyle">@style/Your.TabWidget</item>
  </style>

My question is very simple:

How do I change the colour of the tabs in a TabbedPage? Surely, that's not such a difficult thing to do.


Viewing all articles
Browse latest Browse all 89864

Trending Articles