Is there a difference between the .create () and .show () methods of the Builder AlertDialog class? For example, when we create a warning dialog using:
AlertDialog.Builder builder = new
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setMessage("");
builder.setPositiveButton(....)
builder.setNegativeButton(....)
What is recommended to use pratice and why?
builder.create() //I have seen this creates and displays the dialog
OR
builder.show()
OR
builder.create().show()
I read the documentation. But he could not make any sense from him. Any ideas?
source
share