How to Build AppCompatDialog From AlertDialog.Builder or Equivalent?

Neoh

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?

Neoh

Just found the solution. I should import

import android.support.v7.app.AlertDialog;

and then AppCompatDialog dialog = builder.create() will work.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

AlertDialog Builder setSingleChoiceItems from enum

From Dev

How to write onDismissListener to AlertDialog builder?

From Dev

How to build scene builder from openjfx sources

From Dev

Launch AlertDialog.Builder from Service

From Dev

Get editText value from alertDialog builder

From Dev

Getting value from EditText within an AlertDialog Builder

From Dev

How to dismiss AlertDialog.Builder with custom button

From Dev

Prevent StatusBar from showing when using AlertDialog.Builder

From Dev

How to populate AlertDialog from Arraylist?

From Dev

How to get views from AlertDialog?

From Dev

How to display Toast from AlertDialog?

From Dev

How to populate AlertDialog from Arraylist?

From Dev

AlertDialog.Builder with a custom view: how to initialize the view?

From Dev

How to change the title of a AlertDialog.Builder after it is shown?

From Dev

How to check if AlertDialog.builder is showing and cancelling it if its showing?

From Dev

How do I call findViewById on an AlertDialog.Builder?

From Dev

How to dismiss AlertDialog.Builder without onClick methods of buttons?

From Dev

AutoCompleteTextView in a AlertDialog Builder

From Dev

AlertDialog.builder setSelection

From Dev

AutoCompleteTextView in a AlertDialog Builder

From Dev

AlertDialog.Builder Error

From Dev

how to remove the -j9 option from the build process in gnome-builder

From Dev

How to build abstract classes using builder pattern?

From Dev

How to build form builder that adds span to labels?

From Dev

How to show an image from a GridView in an AlertDialog?

From Dev

android: how to set icon from database for AlertDialog?

From Dev

how pass result from alertDialog to onActivityResult

From Dev

Android: How to remove rectangular corners from AlertDialog?

From Dev

How to get values from a multichoice listview alertdialog

Related Related

  1. 1

    AlertDialog Builder setSingleChoiceItems from enum

  2. 2

    How to write onDismissListener to AlertDialog builder?

  3. 3

    How to build scene builder from openjfx sources

  4. 4

    Launch AlertDialog.Builder from Service

  5. 5

    Get editText value from alertDialog builder

  6. 6

    Getting value from EditText within an AlertDialog Builder

  7. 7

    How to dismiss AlertDialog.Builder with custom button

  8. 8

    Prevent StatusBar from showing when using AlertDialog.Builder

  9. 9

    How to populate AlertDialog from Arraylist?

  10. 10

    How to get views from AlertDialog?

  11. 11

    How to display Toast from AlertDialog?

  12. 12

    How to populate AlertDialog from Arraylist?

  13. 13

    AlertDialog.Builder with a custom view: how to initialize the view?

  14. 14

    How to change the title of a AlertDialog.Builder after it is shown?

  15. 15

    How to check if AlertDialog.builder is showing and cancelling it if its showing?

  16. 16

    How do I call findViewById on an AlertDialog.Builder?

  17. 17

    How to dismiss AlertDialog.Builder without onClick methods of buttons?

  18. 18

    AutoCompleteTextView in a AlertDialog Builder

  19. 19

    AlertDialog.builder setSelection

  20. 20

    AutoCompleteTextView in a AlertDialog Builder

  21. 21

    AlertDialog.Builder Error

  22. 22

    how to remove the -j9 option from the build process in gnome-builder

  23. 23

    How to build abstract classes using builder pattern?

  24. 24

    How to build form builder that adds span to labels?

  25. 25

    How to show an image from a GridView in an AlertDialog?

  26. 26

    android: how to set icon from database for AlertDialog?

  27. 27

    how pass result from alertDialog to onActivityResult

  28. 28

    Android: How to remove rectangular corners from AlertDialog?

  29. 29

    How to get values from a multichoice listview alertdialog

HotTag

Archive