android - Customizing the Contextual Action Bar -


so i'm trying figure out how change color of contextual action bar menu item text in abs.

how customize text color , positioning (that is, gravity centered) of menu items?

i've been struggling styles xml while trying change text color, can't figure 1 out.

this style i'm trying achieve. appreciated! thanks!

enter image description here

 <style name="theme.myapp" parent="@style/holo.theme.light.darkactionbar">     <item name="android:actionbaritembackground">@drawable/selectable_background_myapp</item>     <item name="android:popupmenustyle">@style/popupmenu.myapp</item>     <item name="android:dropdownlistviewstyle">@style/dropdownlistview.myapp</item>     <item name="android:actionbartabstyle">@style/actionbartabstyle.myapp</item>     <item name="android:actiondropdownstyle">@style/dropdownnav.myapp</item>     <item name="android:actionbarstyle">@style/actionbar.solid.myapp</item>     <item name="android:actionmodebackground">@drawable/cab_background_top_myapp</item>     <item name="android:actionmodesplitbackground">@drawable/cab_background_bottom_myapp</item>     <item name="android:actionmodeclosebuttonstyle">@style/actionbutton.closemode.myapp</item>     <item name="android:actiondropdownstyle">@style/actionbar.solid.myapp.navigationdropdownstyle</item>     <item name="android:spinnerdropdownitemstyle">@style/actionbar.solid.myapp.navigationdropdownstyle.item</item>     <item name="actionbaritembackground">@drawable/selectable_background_myapp</item>     <item name="popupmenustyle">@style/popupmenu.myapp</item>     <item name="dropdownlistviewstyle">@style/dropdownlistview.myapp</item>     <item name="actionbartabstyle">@style/actionbartabstyle.myapp</item>     <item name="actiondropdownstyle">@style/dropdownnav.myapp</item>     <item name="actionbarstyle">@style/actionbar.solid.myapp</item>     <item name="actionmodebackground">@drawable/cab_background_top_myapp</item>     <item name="actionmodesplitbackground">@drawable/cab_background_bottom_myapp</item>     <item name="android:actionmodeclosedrawable">@drawable/icon_navigation_accept</item>     <item name="actionmodeclosedrawable">@drawable/icon_navigation_accept</item>     <item name="textcolorprimary">#ffffff</item>     <item name="actiondropdownstyle">@style/actionbar.solid.myapp.navigationdropdownstyle</item>     <item name="spinnerdropdownitemstyle">@style/actionbar.solid.myapp.navigationdropdownstyle.item</item>     <item name="titletextstyle">@style/actionmode.myapp.textstyle</item>     <item name="actionmodeclosebuttonstyle">@style/myapp.actionmodeclosebutton</item>     <item name="actionmenutextappearance">@style/actionmode.myapp.textstyle</item> </style>  <style name="myapp.actionmodeclosebutton" parent="@android:style/widget.devicedefault.actionbutton.closemode">     <item name="android:textcolor">#000000</item>     <item name="android:text">done</item>     <item name="android:visibility">invisible</item> </style>   <style name="actionmode.myapp.textstyle" parent="widget">     <item name="actionmenutextcolor">#000000</item> </style>  <style name="actionbar.solid.myapp" parent="style/widget.sherlock.actionbar.solid">     <item name="android:background">@drawable/ab_solid_myapp</item>     <item name="android:backgroundstacked">@drawable/ab_stacked_solid_myapp</item>     <item name="android:backgroundsplit">@drawable/ab_bottom_solid_myapp</item>     <item name="android:progressbarstyle">@style/progressbar.myapp</item>     <item name="android:titletextstyle">@style/actionbar.solid.myapp.titletextstyle</item>      <item name="background">@drawable/ab_solid_myapp</item>     <item name="backgroundstacked">@drawable/ab_stacked_solid_myapp</item>     <item name="backgroundsplit">@drawable/ab_bottom_solid_myapp</item>     <item name="progressbarstyle">@style/progressbar.myapp</item>     <item name="titletextstyle">@style/actionbar.solid.myapp.titletextstyle</item>      <item name="divider">?attr/dividervertical</item>     <item name="itempadding">8dip</item> </style> 

roman nurik has made : https://plus.google.com/+romannurik/posts/r49wvvcdoew it's not contextual action bar, it's custom view.

done | discard


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -