Wednesday, February 5, 2014

I need to do a program initialization, how to control the interface?


            
Sometimes the procedure done once initialized, this time do not want the interface to be operated, how it should be handled?

I would like to handle it, covering a AlertDialog.Builder bd = new AlertDialog.Builder (this);

The question is: After the initialization process, how to destroy this bd
?
Reply:
Set bd = null;
GC was given then automatically recovered.
Reply:
processdialog
Reply:
/ **
* Load wait
* /
public static void progressDialog (String msg, Context context) {
mDialog = new ProgressDialog (context);
mDialog.setProgressStyle (ProgressDialog.STYLE_SPINNER);
mDialog.setMessage (msg);
mDialog.setIndeterminate (false);
mDialog.setCancelable (true);
mDialog.setCanceledOnTouchOutside (false);
mDialog.show ();
}

/ **
* Close loading wait
* /
public static void closeProgressDialog () {
if (mDialog! = null)
mDialog.dismiss ();
}

No comments:

Post a Comment