-2
我正在製作一個新的應用程序與材料design.I有應用程序緊湊的庫,以支持預棒棒糖devices.I已顯示藍色color.The代碼工作良好的棒棒糖設備,但當我在棒棒糖設備上運行這個應用程序時,工具欄的顏色不會改變。風格不適用於棒棒糖設備
Style.Xml
<resources>
<style name="HsJobTheme" parent="CustomTheme">
</style>
<style name="CustomTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
</style>
<style name="HsJobsToolBar" parent="ThemeOverlay.AppCompat.Light">
<item name="android:windowBackground">@color/colorPrimary</item>
<item name="android:textColorPrimary">#fffffa12</item>
</style>
</resources>
Style.Xml(V21)
<resources>
<style name="HsJobTheme" parent="CustomTheme">
<item name="android:colorPrimary">@color/colorPrimary</item>
<item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
</style>
</resources>
toolbar.xml
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/toolbar"
android:theme="@style/HsJobsToolBar"
xmlns:android="http://schemas.android.com/apk/res/android"></android.support.v7.widget.Toolbar>
任何佈局我使用的動作條活動只,但仍它不預棒糖設備改變 – Anuj 2015-03-19 09:46:32
您是否在'AndroidManifest'中擁有'android:theme =「@ style/CustomTheme」屬性? – momo 2015-03-19 10:14:01
'android:theme =「@ style/HsJobTheme」' – momo 2015-03-19 10:20:39