藍騎兵
分享精彩

Stack Overflow 排錯翻譯 – Closing AlertDialog.Builder in Android -Android環境中關閉AlertDialog.Builder Stack Overflow 排錯翻譯

排錯翻譯 ?– Closing AlertDialog.Builder in -Android環境中關閉AlertDialog.Builder

原文:

In the following code, I tried to dismiss the AlertDialog box but to no avail. However, if I remove compareKeys() function, the dismiss will work. So how can I make it dismiss after calling the compareKeys() function?

:

在下面的代碼中,我嘗試去釋放AlertDialog對話框,但釋放無效。然而,我去掉 compareKeys()方法后,釋放AlertDialog是正常工作的。我如何在釋放AlertDialog對話框后正常調用compareKeys()方法?

解決方案原文:Call dialog.dismiss() before password = input.getText().toString() and add dialog.dismiss() inside setNegativeButton’s OnClickListener too.

解決方案翻譯:將password = input.getText().toString()放到調用dialog.dismiss()之前,并將dialog.dismiss()放到setNegativeButton的OnClickListener方法中。

未經允許不得轉載:藍騎兵-JAVA,技術,美食,雜七雜八的記錄 » Stack Overflow 排錯翻譯 – Closing AlertDialog.Builder in Android -Android環境中關閉AlertDialog.Builder

分享到:更多 ()

評論 1

  • 昵稱 (必填)
  • 郵箱 (必填)
  • 網址
福利彩票25选5走势图