When using Theme.Sherlock.Light.DarkActionBar
(or Theme.Holo.Light.DarkActionBar
, doesn\'t make a difference), the ActionMode (or \"contextual ActionB
The solution is to use the ActionBar's context to create the AlertDialog:
Context themedContext = getActivity().getActionBar().getThemedContext();
Or using ActionBarSherlock/ActionBarCompat:
Context themedContext = getActivity().getSupportActionBar().getThemedContext();
Then create the AlertDialog using this themed context:
AlertDialog.Builder builder = new AlertDialog.Builder(themedContext);
Add this to your theme:
<item name="android:actionModeCutDrawable">@drawable/ic_menu_cut_holo_light</item>
<item name="android:actionModeCopyDrawable">@drawable/ic_menu_copy_holo_light</item>
<item name="android:actionModePasteDrawable">@drawable/ic_menu_paste_holo_light</item>
<item name="android:actionModeSelectAllDrawable">@drawable/ic_menu_selectall_holo_light</item>
And then add the necessary drawable resources to your project which can be found here: https://github.com/android/platform_frameworks_base/tree/master/core/res/res