1

Let's say I want to create a style for the action bar title text, that is required to inherit the Android base style:

<style name="AppActionBarTitleText" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
    <item name="android:textColor">@color/white_text</item>
</style>

But I also want to add these items that I'm already using in other places:

<style name="MyCustomStyle">
    <item name="android:shadowColor">#44000000</item>
    <item name="android:shadowDx">3</item>
    <item name="android:shadowDy">3</item>
    <item name="android:shadowRadius">1.5</item>
    ...
</style>

Can I make the AppActionBarTitleText style inherit from both the required Android parent, and my custom style?

Or is there a way to include the attributes of my custom style (MyCustomStyle) into the action bar title text style (AppActionBarTitleText), without having to duplicate them?

P.S. I cannot inherit MyCustomStyle from @android:style/TextAppearance.Holo.Widget.ActionBar.Title, because I'm also using the style for other TextView objects, etc.

TechAurelian
  • 5,561
  • 5
  • 50
  • 65

0 Answers0