0
我在一個形狀中有兩種顏色的漸變,我想把它放在我的應用程序的actionBar中,最好是風格,因爲我希望所有的應用程序欄都具有這種可視化效果。在後臺可繪製ActionBar
我試試這個
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorAccent">@color/colorAccent</item>
<item name="android:actionBarStyle">@style/AppTheme.ActionBar</item>
</style>
<style name="AppTheme.ActionBar" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="android:background">@drawable/shape_toolbar</item>
</style>
但未能
我怎麼能這樣做?
我找到了我的問題的答案在這裏https://stackoverflow.com/a/18288453 –