Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在onCreateDialog()我的自定义对话框的方法中,我使用构建器设置了肯定、取消和中性按钮侦听器。
onCreateDialog()
我想使用中性按钮来重置对话框界面控件,并且不希望它在用户按下它时关闭对话框。
我怎样才能做到这一点?
附言。我的自定义对话框基于 Android 开发人员指南的 FireMissilesDialogFragment 示例。我设置中性按钮的方式与设置确定和取消按钮的方式相同。但我不知道如何在按下中性按钮时防止对话框关闭。