AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() {
@Override
protected void onPostExecute(Void result) {
Log.d("522", "");
}
@Override
protected void onPreExecute() {
Log.d("522", "");
}
@Override
protected Void doInBackground(Void... arg0) {
try {
Log.d("522", "");
Thread.sleep(3000);
Log.d("522", "3秒後ProgressDialog還在就關掉");
if (mProgressDialog != null) {
try {
mProgressDialog.dismiss();
} catch (Exception e) {
e.printStackTrace();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
};
沒有留言:
張貼留言