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("提示", "正在加载......");
}
/*
* 提示加载
*/
public void showProgressDialog(String title, String message) {
if (progressDialog == null) {
progressDialog = ProgressDialog.show(DateReportActivity.this, title,
message, true, false);
} else if (progressDialog.isShowing()) {
progressDialog.setTitle(title);
progressDialog.setMessage(message);
}
progressDialog.show();
}
/*
* 隐藏提示加载
*/
public void hideProgressDialog() {
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
}
}
}
正在加载中
最新推荐文章于 2022-01-14 11:18:43 发布