Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Action Mode icon of SherlockActionBar library?

I have use SherlockActionBar library in my application ,now i want to change icon of ActionMode . Below is screen show in which i have high lighted my ActionMode in which i want to set my own icon.

enter image description here

Please help me to change icon in ActionMode.

like image 783
Herry Avatar asked Jan 10 '13 10:01

Herry


1 Answers

You set this in the style resource like so

/res/values-v11/styles.xml

<style name="Theme.YourTheme" parent="Theme.Sherlock">
    <item name="android:actionModeCloseDrawable">@android:drawable/your_drawable</item>
</style>

/res/values/styles.xml   

<style name="Theme.YourTheme" parent="Theme.Sherlock">
    <item name="actionModeCloseDrawable">@android:drawable/your_drawable</item>
</style>

Note the missing android namespace before actionModeCloseDrawable for API < 11 style

Obviously the theme will be different if you are not using actionbarsherlock

like image 84
jiduvah Avatar answered Nov 02 '22 17:11

jiduvah