Code example for ProgressDialog

Methods: setIndeterminatesetProgressStyle, setCancelable, show

0
        this.type = type;
    } 
 
    @Override 
    protected void onPreExecute() { 
        ProgressDialog progDailog = new ProgressDialog(onlineSelectActivity);
        progDailog.setIndeterminate(false);
        progDailog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        progDailog.setCancelable(true);
        progDailog.show();
        dlg = progDailog;// new ProgressDialog.Builder(onlineSelectActivity).setMessage("loading").set.show();
        super.onPreExecute();    //To change body of overridden methods use File | Settings | File Templates. 
    } 
 
    @Override 
    protected void onPostExecute(GameCollection aVoid) {
        super.onPostExecute(aVoid);    //To change body of overridden methods use File | Settings | File Templates.
        dlg.dismiss();
        onlineSelectActivity.changeFragment(new ViewOnlineGameListFragment(aVoid));
    }