私のXamarin.FormsプロジェクトでMaterialテーマを次のコードで有効にしましたが、Android(Lollipop and Marshmallow)ではステータスバー(時計、等)が変化しない。それは常に黒のままです。 私は既に多くのフォーラムとブログを読んでいますが、多くの組み合わせを試しましたが、私はこのステータスバーを色分けできません。Xamarinフォーム:Androidのスタイルスタイルのステータスバーの色をカスタマイズする
MainActivity.cs
[Activity(Theme = "@style/MyTheme", Label = "MyApp", Icon = "@drawable/AppIcon", ScreenOrientation = ScreenOrientation.Portrait, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
値-V21/style.xml
<resources>
<style name="MyTheme.Splash" parent="android:Theme.Material.Light">
<item name="android:windowBackground">@drawable/SplashScreen</item>
<item name="android:windowNoTitle">true</item>
</style>
<style name="MyTheme" parent="android:Theme.Material.Light">
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:colorPrimary">@color/Brand</item>
<item name="android:textColorPrimary">@color/White</item>
<item name="android:statusBarColor">@color/BrandDark</item>
<item name="android:colorPrimaryDark">@color/BrandDark</item>
<item name="android:colorAccent">@color/Brand</item>
<item name="android:textColor">@color/Brand</item>
</style>
</resources>
値/ colors.xml
<resources>
<color name="SplashBackground">#f78b2b</color>
<color name="Brand">#f78b2b</color>
<color name="BrandDark">#e47108</color>
<color name="White">#ffffff</color>
</resources>
おかげFまたは任意のヘルプ!
ありがとうございました!すべての設定が表示される場所またはユーザーガイドがありますか?たとえば、テキストエントリのバーの色を変更したり、ボタンの影を削除するなどです。 – Stefano
これは通常、Android開発ガイドで定義されています。 http://developer.android.com/training/material/theme.htmlは良い出発点です。しかし、AppCompatとの組み合わせでは、ちょっと気になるところがあります。 –