Code example for ProgressDialog

Methods: cancelisShowing

0
 
    /** 
     * cancel ProgressBar 
     */ 
    public static void cancelProgressDialog() { 
        if (mProgressDialog != null && mProgressDialog.isShowing())
            mProgressDialog.cancel();
    } 
 
    /** 
     * helper method to display a toast specified by the resource id (strings.xml) 
     *  
     * @param context 
     *            a {@link android.content.Context} object. 
     * @param resid 
     *            a int. 
     */ 
    public static void makeToast(Context context, int resid) {
        Toast toast = Toast.makeText(context, resid, Toast.LENGTH_LONG);
        toast.show();