Abo*_*P S 5 android xamarin.android xamarin xamarin.forms
我正在使用 Xamarin Forms,我想更改 Android 中导航栏的颜色。我使用这个代码:
MainPage = new NavigationPage
{
BarBackgroundColor = Color.Lime,
BarTextColor = Color.Purple
};
第一个属性 ( BarBackgroundColor
) 已起作用,第二个属性未起作用 ( BarTextColor
)。
请好心回答我。
如果您尝试在 Android 5.0 或更高版本上设置文本颜色,则需要Theme
设置MainActivity
. 这是一个应该有效的简单方法......
[Activity(
Label = "Some App Title",
Icon = "@drawable/icon",
MainLauncher = true,
Theme = "@style/android:Theme.Holo.Light"
)]
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7280 次 |
最近记录: |