I got this alertDialog with a multiple choice item selection:
builder.setTitle(R.string.layer_options_title)
.setMultiChoiceItems(availableOptions, selectedLayerOptions, new DialogInterface.OnMultiChoiceClickListener() {
...
});
where
availableOptions = getApplicationContext().getResources().getStringArray(R.array.layer_options);
comes from
<string-array name="layer_options">
<item>Should have green background</item>
<item>Should have yellow background</item>
<item>Should have orange background</item>
<item>Should have blue background</item>
</string-array>
Is there any way to make these multiple choice items have a background color?
Try this:
screenshot
Yes, there is a way. Put your checkbox in a layout and give the layout backgrond color. This is how I could do it:
The result:
Firstly, I created a main layout (vertical) as you see in the code. Then, for each one of the checkboxes I created a horizontal layout. In this case you can play with the colors and fonts of the elements (checkboxes, items, and etc.).