本文整理匯總了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();
}
}