1. Add <item name= "Android:actionbartabstyle" > @style/backupactionbartabview</item> in your theme theme
<resources> <style name= "Backuprestore.theme" parent= "@android: Style/theme.funui" > <item name= "an Droid:windowfullscreen ">true</item> <item name= "Android:actionbarstyle" > @style/actionbar_def_style</item> <item nam E= "Android:actionbartabstyle" > @style/backupactionbartabview</item> <item name= "Android: Actionbartabtextstyle "> @style/customactionbartabtextstyle</item> <item name=" Android:actionModeStyle "> @style/actionmode_def_style</item> </style>
<style name= "Customactionbartabtextstyle" > <item name= "Android:textcolor" > @color/action_bar_title_ text_color</item> <item name= "android:textsize" > @dimen/action_bar_title_text_size</item> & Lt;item name= "Android:paddingstart" > @dimen/action_bar_title_text_size</item> </style>
<style name= "Backupactionbartabview" parent= "@android: Style/widget.holo.light.actionbar.tabview" >
<item name= "Android:background" > #04cd74 </item>
<item name= "Android:gravity" >center_horizontal</item>
<item name= "Android:paddingstart" >66dip</item>
</style>
</resources>
2. In <style name= "Backupactionbartabview" parent= "@android: Style/widget.holo.light.actionbar.tabview" > Define related properties in
1) <item name= "Android:paddingstart" >66dip</item> This can change the position of the title, but it is always relative to the position within its own box, for example, if you have two headings, Then your first title will be a distance to the left screen 66dip, the second title will be separated from the middle of the position 66dip,<item name= "Android:paddingend" >66dip</item> properties similar to this
2) In fact <item name= "Android:actionbartabtextstyle" > @style/customactionbartabtextstyle</item> can also adjust the position of the title, But it adjusts the position of the text relative to the box <item name= "Android:paddingstart" > @dimen/action_bar_title_text_size</item>
However, these two use very inconvenient, as to how to let two headings to the middle of the method has not been found, after learning to add it
Modify Actionmode tab layout in Android-theme