本文整理汇总了Java中android.app.ProgressDialog.cancel方法的典型用法代码示例。如果您正苦于以下问题:Java ProgressDialog.cancel方法的具体用法?Java ProgressDialog.cancel怎么用?Java ProgressDialog.cancel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.app.ProgressDialog
的用法示例。
在下文中一共展示了ProgressDialog.cancel方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: insertIntoList
import android.app.ProgressDialog; //导入方法依赖的package包/类
private void insertIntoList(WifiObject wifi) {
wifiArrayAdapter.add(wifi);
final ProgressDialog progress = new ProgressDialog(getActivity());
progress.setTitle("Learning");
progress.setMessage("Please wait while we are collecting the Wifi APs around you...");
progress.setCanceledOnTouchOutside(false);
progress.show();
Runnable progressRunnable = new Runnable() {
@Override
public void run() {
progress.cancel();
handler.removeCallbacks(runnableCode);
}
};
Handler pdCanceller = new Handler();
pdCanceller.postDelayed(progressRunnable, learnPeriodVal * 60 * 1000);
}
示例2: hideWaitDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
* hide waitDialog
*/
protected void hideWaitDialog() {
ProgressDialog dialog = mDialog;
if (dialog != null) {
mDialog = null;
try {
dialog.cancel();
// dialog.dismiss();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
示例3: hideWaitDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
private void hideWaitDialog() {
ProgressDialog dialog = mDialog;
if (dialog != null) {
mDialog = null;
try {
dialog.cancel();
// dialog.dismiss();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
示例4: hideWaitDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
* hide waitDialog
*/
private void hideWaitDialog() {
ProgressDialog dialog = mDialog;
if (dialog != null) {
mDialog = null;
try {
dialog.cancel();
// dialog.dismiss();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
示例5: hideWaitDialog
import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
* hide waitDialog
*/
private void hideWaitDialog() {
ProgressDialog dialog = mDialog;
if (dialog != null) {
mDialog = null;
try {
dialog.cancel();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
示例6: loginToFoursquare
import android.app.ProgressDialog; //导入方法依赖的package包/类
public void loginToFoursquare() {
ProgressDialog prog = new ProgressDialog(activity);
prog.setMessage(activity.getString(R.string.foursquare_please_wait));
prog.setCancelable(false);
prog.show();
foursquare = new Foursquare(
ApiObjects.foursquare.get("client_key"),
ApiObjects.foursquare.get("client_secret"),
redirectUrl);
foursquare.authorize(getActivity(),
new FoursquareAuthenDialogListener());
prog.cancel();
}
示例7: hideProgressBar
import android.app.ProgressDialog; //导入方法依赖的package包/类
/**
* this function is used to hide progress dialog.
*
* @param progressDialog - progress dialog object (not be null)
*/
public static void hideProgressBar(ProgressDialog progressDialog) {
try {
if (progressDialog != null)
progressDialog.cancel();
} catch(IllegalArgumentException e) {
e.printStackTrace();
}
}