【发布时间】:2016-04-05 08:28:49
【问题描述】:
风格/应用主题:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@color/colorBackground</item>
</style>
样式/ActivityCustomToolbarTheme:
<style name="ActivityCustomToolbarTheme" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
工具栏:
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:theme="@style/ThemeOverlay.AppCompat.Light"/>
我将app:theme设置为这个,但它总是黑色的。如果设置@style/ThemeOverlay.AppCompat.Dark,它是灰色的。
其他不自定义的activity也可以,但是如何设置自定义主题呢?
【问题讨论】:
标签: android button toolbar back