Before this I used a DialogBuilder to create AlertDialog like this
AlertDialog.Builder builder = new AlertDialog.Builder(context);
...
...
AlertDialog dialog = builder.create();
How can I build the new AppCompatDialog from a dialog builder, or is there another new equivalent way to do that?
Just found the solution. I should import
and then
AppCompatDialog dialog = builder.create()will work.