i want to add white color to text in alert box(file1,file2...file4) but it shows the default color black itself.
Here is my java code
if (storagePermissionGrant()) {
final Activity activity = this;
String[] items = {"file1", "file2", "file3", "file4"};
ContextThemeWrapper ctw = new ContextThemeWrapper(this, R.style.re);
AlertDialog.Builder builder = new AlertDialog.Builder(ctw);
builder.setTitle("Menu")
.setItems(items, (dialog, which) -> {
switch (which) {
case 0:
MediaUtils.openfile1(activity);
break;
case 1:
MediaUtils.openfile2(activity);
break;
case 2:
MediaUtils.openfile3(activity);
break;
case 3:
MediaUtils.openfile4(activity);
break;
default:
return;
}
});
builder.show();
}
here is my style.xml code
<style name="re" parent="@android:style/Widget.Holo.ActionBar.Solid">
<item name="android:background">@color/colorPrimary</item>
<item name="colorAccent">#fff</item>
<!--title-->
<item name="android:textColor">#fff</item>
<!--text-->
<item name="android:textColorPrimary">#fff</item>
<!--selection list-->
<item name="android:textColorTertiary">#fff</item>
</style>