Objective
This article is mainly about how to implement the Click button, pop-up "Loading data, please wait ..." dialog box, after loading, the dialog will automatically disappear?
In fact, it is also very simple to look at the following code:
import COM.FARSUNSET.ICHAT.EXAMPLE.R;
Import Android.os.Bundle;
Import android.app.Activity;
Import Android.app.ProgressDialog;
public class Datereportactivity extends activity {private ProgressDialog progressdialog;
@Override protected void OnCreate (Bundle savedinstancestate) {super.oncreate (savedinstancestate);
Setcontentview (R.layout.activity_date_report);
Showprogressdialog ("Prompt", "Loading ..."); /* Prompt to load/public void Showprogressdialog (string title, String message) {if (ProgressDialog = = null) {p
Rogressdialog = Progressdialog.show (datereportactivity.this, title, message, True, false);
else if (progressdialog.isshowing ()) {Progressdialog.settitle (title);
Progressdialog.setmessage (message);
} progressdialog.show (); * * * Hide prompt to load/public void Hideprogressdialog () {if (ProgressDialog!= null && progressdialog.isshowi
Ng ()) {Progressdialog.dismiss (); }
}
}
Summarize
OK, the above method can be used to implement the Android load Prompt "is loading, please later", the above is the entire content of this article, as for the XML file to write what is not to control, as long as you do project when using the networking program, you can use the above two methods. Hope that the content of this article for everyone's study or work can bring certain help, if there is doubt you can message exchange.