Search code examples
androidxamarin.formsiconstabbedpage

How to change tabbed page icon color?


I am working on the tabbed page in xamarin.forms android, Though I have placed images which are white in color, they are displaying in dark red color.

Here is the Tabbar.xml

<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:tabIndicatorColor="@android:color/white"
app:tabGravity="fill"
app:tabMode="fixed"
android:textAllCaps="false" />

Do I have to change anything here to get the Icon as I wanted?enter image description here

Those two images are actually white colored, how can change them to white?


Solution

  • I have resolved my issue by adding the following lines in view.

      xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
            android:TabbedPage.BarItemColor="#66FFFFFF"
            android:TabbedPage.BarSelectedItemColor="White"