Code example for ProgressDialog

Methods: dismiss, isShowing

0
    } 
 
    @Override 
    public void finish() { 
        try { 
            if (mProgressDialog.isShowing()) {
                mProgressDialog.dismiss();
            } 
        } catch (Exception e) {
            Log.e(LOGTAG, "exception while closing progress dialog: ", e);
        } 
        super.finish(); 
    } 
 
    @Override 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // mHandler is created here so runnables can be run on the main thread 
        mHandler = new Handler();
        setContentView(R.layout.crash_reporter);
        mProgressDialog = new ProgressDialog(this);