What is the difference between a dialog being dismissed or canceled in Android?

前端 未结 4 903
醉酒成梦
醉酒成梦 2020-12-02 05:27

Like the title says, what is the difference between a dialog being dismissed or canceled in Android?

4条回答
  •  天命终不由人
    2020-12-02 06:10

    Dismiss Calling the dismiss removes the dialog from the screen. This method can be invoked safely from any thread. Note that you should not override this method to do cleanup when the dialog is dismissed, instead implement that in onStop.

    Cancel Calling the cancel, cancels the dialog. This is essentially the same as calling dismiss(), but it will also call your DialogInterface.OnCancelListener, if registered.

    Hide This method hides the dialog, but do not dismiss it.

    And for more see here

提交回复
热议问题