I\'m trying to change the text color in dialog boxes, most commonly AlertDialog. I\'ve tried every solution at these pages:
AlertDialog styling - how to change styl
In your case, I think the dialog theme would work.
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.YourDialogStyle;
You can specify your dialog theme just like the code above.
<style name="YourDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="android:colorAccent">@color/primary</item>
<item name="android:textColor">@color/accent</item>
<item name="android:textColorPrimary">@color/primary_dark</item>
</style>
Here is the example of theme for Dialog.
Another option is you can make your own custom layout for the dialog.