I am developing an Android application.
I would like to hide the OK button after the user clicks it, since the dialog box will remain in the foreground for a few seconds while the calculation is in progress.
This is the code:
new AlertDialog.Builder(this) .setMessage("This may take a while") .setPositiveButton("OK", new android.content.DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) {
How can i achieve this?
PS: I'm not interested in more complex methods of processing calculations (such as: progress dialogs, multithreading).
Thank.
android alertdialog
dan Nov 27 2018-10-12T00: 00Z
source share