I am trying to mimic the indigo pink and white colored style, as specified by Google here.
If I choose the parent theme as android:Theme.Material, then the background will be dark and text will be white. That led me to choose the parent app theme to be android:Theme.Material.Light
.
However, now the items in ActionBar are colored black. I was able to style the text color back to white by
<style name="AppTheme" parent="android:Theme.Material.Light">
...
<item name="android:actionBarStyle">@style/AppTheme.MyActionBar</item>
...
</style>
<style name="AppTheme.MyActionBar" parent="@android:style/Widget.Material.ActionBar">
...
<item name="android:titleTextStyle">@style/AppTheme.MyActionBar.TitleTextStyle</item>
...
</style>
<style name="AppTheme.MyActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Material.Widget.ActionBar.Title">
<item name="android:textColor">@android:color/white</item>
</style>
Now I need to override the color of the back button.
Unfortunately, specifying the parent of MyActionBar style as @android:style/Widget.Material.ActionBar
(rather than @android:style/Widget.Material.Light.ActionBar
) does not do the job.
This discussion How to customize the back button on ActionBar tells how to specify a resource via @drawable. Yet, I would like to use the back button from the dark theme using approach similar to styling text.
Is it possible to change the color of an ActionBar back button by somehow inheriting pre-existing style?
Thank you for your attention.