當前位置: 首頁>>代碼示例>>Java>>正文


Java ProgressDialog.cancel方法代碼示例

本文整理匯總了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);
}
 
開發者ID:uncleashi,項目名稱:find-client-android,代碼行數:20,代碼來源:LearnFragment.java

示例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();
        }
    }
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:16,代碼來源:WXEntryActivity.java

示例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();
        }
    }
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:13,代碼來源:ShareDialog.java

示例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();
        }
    }
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:16,代碼來源:ShareDialogBuilder.java

示例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();
        }
    }
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:15,代碼來源:UserEventSigninActivity.java

示例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();
}
 
開發者ID:Dnet3,項目名稱:CustomAndroidOneSheeld,代碼行數:14,代碼來源:FoursquareShield.java

示例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();
    }
}
 
開發者ID:pawanchauhan05,項目名稱:AndroidUtility,代碼行數:14,代碼來源:Utils.java


注:本文中的android.app.ProgressDialog.cancel方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。