Theme not applying to DialogFragment on Android

You shoudn’t use the AlertDialog.Builder(Context, int) constructor with the support library because it is only available since API 11.

To setup a theme to your dialog, use instead a ContextThemeWrapper like this:

ContextThemeWrapper context = new ContextThemeWrapper(getActivity(),;
AlertDialog.Builder builder = new AlertDialog.Builder(context);

Leave a Comment