Yes or No confirmation in Android Preferences [duplicate]
问题 This question already has answers here : How to implement a confirmation (yes/no) DialogPreference? (3 answers) Closed 5 years ago . I need to implement a "Reset" option in Settings. When the setting is clicked, a simple dialog should open asking to confirm. I've taken a look at DialogPreference but I can't seem to be able to find a good solution, or tutorials anywhere. Can someone please help me out? I'm a beginner, ideas or even code would be very helpful, thank you. 回答1: I used a simple