Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Styling the contextual action bar?

i am using orange color theme in ma action bar ,In edit Text when user try to do copy,paste it invokes the contextual action with default blue color background ,it's little weird for users,can i change the background of contextual action bar ?

like image 377
Asthme Avatar asked Jul 18 '14 08:07

Asthme


1 Answers

Try adding this to your style in your styles.xml and use any custom color you would like.

<item name="android:actionModeBackground">@android:color/holo_orange_light</item>

You can also change the drawables for each icon using similar code.

android:actionModeCloseDrawable
android:actionModeCopyDrawable
android:actionModeCutDrawable
android:actionModePasteDrawable
android:actionModeSelectAllDrawable

Credit to the tutorial here - http://www.codercowboy.com/2013/07/05/styling-the-contextual-action-bar-actionmode-divider-or-splitter-for-android/ for changing the contextual action bar icons. Which told me that starting with actionMode changes the contextual action bar attributes

like image 114
Jake Weso Avatar answered Nov 04 '22 00:11

Jake Weso