Reputation: 172
I have a simple alert dialog, it ll display when a button click is occurs. and hide automatically after receiving data from web service (On Button click ) .
The code below is showing the alert dialog, but i cant hide it after receiving data also.
alertDialog1.setTitle("Please Wait");
alertDialog1.setCancelable(false);
alertDialog1.setMessage("Fetching Info");
alertDialog1.show();`
Upvotes: 6
Views: 14282
Reputation: 31
alertdialog1.setPositiveButton("Close", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
Upvotes: 2