How can I get the results from an AlertDialog?

后端 未结 6 1479
别跟我提以往
别跟我提以往 2020-12-16 10:57

I am using an AlertDialog.Builder to display a dialog to prompt the user to enter a password, I then want to save that password in a preference, however I can\'t figure out

6条回答
  •  萌比男神i
    2020-12-16 11:28

    You can follow the Dialog tutorial in developer.android.com.

    First create dialog class:

    Adding a list

    Then add listener to this class to pass result to the activity.

    Passing Events Back to the Dialog's Host

提交回复
热议问题