android : ProgressDialog 进度条的快捷使用
private ProgressDialog myProgressDialog = null;//进度条
//显示进度提示
public void showProgress(String title, String msg) {
try {
if (myProgressDialog != null) {
myProgressDialog.cancel();
}
myProgressDialog = ProgressDialog.show(this, title, msg);
myProgressDialog.setCancelable(false);
} catch (Exception e) {
} finally {
}
}
//取消进度提示
public void cancelProgress(){
try {
if (myProgressDialog!=null) {
myProgressDialog.dismiss();
myProgressDialog.cancel();
}
} catch (Exception e) {
} finally {
}
}
补充:移动开发 , Android ,