如何更改标签页图标颜色?
How to change tabbed page icon color?
我正在 xamarin.forms android 中的标签页上工作,虽然我放置了白色的图像,但它们显示为深红色。
这是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" />
我是否必须在这里更改任何内容才能获得我想要的图标?
那两张图其实是白色的,怎么改成白色呢?
我已通过在视图中添加以下行解决了我的问题。
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
android:TabbedPage.BarItemColor="#66FFFFFF"
android:TabbedPage.BarSelectedItemColor="White"
我正在 xamarin.forms android 中的标签页上工作,虽然我放置了白色的图像,但它们显示为深红色。
这是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" />
我是否必须在这里更改任何内容才能获得我想要的图标?
那两张图其实是白色的,怎么改成白色呢?
我已通过在视图中添加以下行解决了我的问题。
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
android:TabbedPage.BarItemColor="#66FFFFFF"
android:TabbedPage.BarSelectedItemColor="White"