dismiss

fun dismiss()

Dismisses the ProgressDialog, removing it from the Screen. Calls DialogInterface.OnDismissListener, if it is set using setOnDismissListener. To be used after the Task calling ProgressDialog is Over or if any Exception Occurs during Task execution. In case of passing to Another Activity/Fragment, this method SHOULD be called before starting the next Activity/Fragment. Else, it would cause WindowLeakedException.