我无法应用“Theme.AppCompat.NoTitleBar"和“colorPrimaryDark"同时状态栏颜色属性
我想在整个应用程序中隐藏操作栏,还想设置状态栏颜色?在 Appcelerator 钛中.
I want to hide the action bar throughout the application and also want to set the status bar color? in Appcelerator titanium.
请按照官方指南 https://wiki.appcelerator.org/display/guides2/Android+Action+Bar
您可以在 open 事件中的代码 win.activity.actionBar.hide();
中隐藏它并在主题 xml 中使用普通样式,或者您将主题中的父项设置为.
You can either hide it in code win.activity.actionBar.hide();
in the open event and use a normal style in the theme xml or you set your parent in the theme to
<style name="Theme.MyTheme" parent="Theme.AppCompat.NoTitleBar">
.
状态栏颜色是一个主题项:<item name="android:statusBarColor">#ff0000</item>
.您可以添加到您的主题中.
Statusbar color is a theme item:
<item name="android:statusBarColor">#ff0000</item>
. You can add into your theme.
以下是我使用的样式:
<style name="Theme.MyTheme" parent="Theme.AppCompat.NoTitleBar">
<item name="colorPrimary">#212121</item>
<item name="colorPrimaryDark">#000000</item>
<item name="android:statusBarColor">#00d59e</item>
<item name="colorAccent">#ff225c</item>
<item name="android:textColorHint">#999999</item>
</style>
使用
"Window" : {
theme: "Theme.MyTheme",
barColor: "#ff225c"
}