When using Theme.Sherlock.Light.DarkActionBar
(or Theme.Holo.Light.DarkActionBar
, doesn\'t make a difference), the ActionMode (or \"contextual ActionB
I was fighting with the same issue since last two days. Finally I came up with a workaround!
I am using a DialogFragment
with an AlertDialog
object. In the onCreateDialog()
method, all we have to do is get the context of the parent activity and set its theme again to Theme.Light
.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
//get the parent activity context and set it's theme again.
Context ctx = getActivity();
ctx.setTheme(android.R.style.Theme_Holo_Light);
AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
LayoutInflater inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.your_dialog_layout, null, false);
builder.setView(view);
//your other code for the dialog
//
return builder.create();
Now the icons in the Contextual ActionBar of the EditText
have the right color.