简体   繁体   English

android AlertDialog关闭不被调用

[英]android AlertDialog dismiss is not called

I've got some problem.. Well, I create AlertDialog using AlertDialog.Builder , than I using setContentView for setting OK and Cancel buttons and hang up some actions on the dismiss() method. 我遇到了一些问题。好吧,我使用AlertDialog.Builder创建AlertDialog ,而不是使用setContentView设置OKCancel按钮并挂断dismiss()方法的某些动作。 BUT..when I touching anything else this buttons, dismiss() is not called. 但是..当我触摸此按钮的任何其他按钮时,不会调用dismiss()

So, my question is, Which methods are invokes when i touching and how can i call my methods in this case(touching anything else)? 所以,我的问题是,当我触摸时会调用哪些方法,在这种情况下(触摸其他任何东西)如何调用我的方法? Thns! ns!

尝试在对话框上设置onCancelListener()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM