Xamarin形成主题

Xamarin形成主题,xamarin,xamarin.forms,Xamarin,Xamarin.forms,与灯光主题资源合并后,导航栏的颜色已更改。如何在与灯光主题资源合并后更改导航栏的颜色? <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"

与灯光主题资源合并后,导航栏的颜色已更改。如何在与灯光主题资源合并后更改导航栏的颜色?


<?xml version="1.0" encoding="utf-8"?>
<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" <-------- check the value of this 
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    app:tabIndicatorColor="@android:color/white"
    app:tabGravity="fill"
    app:tabMode="fixed" />

有人能给出一个想法吗?你在哪个操作系统上遇到这个问题?你问题中的更多细节可能会有所帮助。你看过文件了吗?例如,您可以设置一个名为
BarBackgroundColor
的属性。我正在开发xamarin forms应用程序,目前我的目标是android,最近我添加了xamarin.forms.Themes.LightTheme,我还将该应用程序与light主题合并,但以前的tabbar和action bar颜色类似于绿色,现在,合并后的颜色会自动设置为浅蓝色,但我不想改变颜色。是的,我以前做过这样的操作,当我在合并主题后无法使用主题时,我遇到了问题。在合并主题之前,一切都很好,但合并主题后会出现问题。你能发布你的tablayout设置吗?“android:id=“@+id/toolbar”android:layout\u width=“match\u parent”android:layou height=“wrap\u content”android:background=“?attr/colorPrimary”android:theme=“@style/ThemeOverlay.AppCompat.Dark.ActionBar”android:popupTheme=“@style/ThemeOverlay.AppCompat.Light“/>即使现在,我还是接受了一个新项目,并添加了Xamarin.Forms.Themes。DLL和我在app.Xaml文件中添加了资源,并在mainactivity中添加了var x=typeof(Xamarin.Forms.Themes.DarkThemeResources);x=类型(Xamarin.Forms.Themes.LightThemeResources);x=typeof(Xamarin.Forms.Themes.Android.UnderlineEffect);LoadApplication(新的AppTesting.App());
<item name="colorPrimaryDark">#a5d6f7</item> <------- light blue