How to style the title text in ActionBarSherlock 4.0?

Hello, I am using ActionBarSherlock version 4.0.0 and I don't know how to change / change the title text, in version 3.5 I used @ style / abTextStyle. but that doenst works in 4.0.0 version.

+3


source to share


1 answer


ABS 4 brought with it some significant improvements, one of which is styling via XML. If you read the style documentation, you know that as of 4.0 -

Due to limitations in the Android system for Android, any theme customization must be declared with two attributes. Normal Android prefix attributes apply the theme to its own action bar and unprefixed attributes for custom implementation. since both topic APIs are exactly the same, you only need to reference your settings twice, instead of having to execute them twice.

<style name="Theme.Styled" parent="Theme.Sherlock.Light.DarkActionBar">
    <item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
    <item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>

      



From this you can see that the ABS element reflects its own exactly , obviously, without a prefix android

.

This, in short, means that styling the main and ABS panel is now much easier and for any style you should follow the standard Android docs on this and then declare the style you want like in the example above (i.e. declare twice, once for media once for ABS).

This ActionBar text color question has some examples of what you want in your voice response, and if you want to be reassured: it was commented by Jake Wharton who is an ABS genius.

+8


source







All Articles