Here you can find the source of hideProgressDialog()
public static void hideProgressDialog()
//package com.java2s; import android.app.Activity; import android.app.ProgressDialog; public class Main { public static Activity mSmartAndroidActivity; private static ProgressDialog progress = null; /**/*ww w . java 2 s . c o m*/ * This method will hide existing progress dialog.<br> * It will not throw any Exception if there is no progress dialog on the * screen and can also be called from non UI threads. */ public static void hideProgressDialog() { mSmartAndroidActivity.runOnUiThread(new Runnable() { @Override public void run() { try { if (progress.isShowing()) progress.dismiss(); } catch (Throwable e) { } } }); } }