Code example for ProgressDialog

Methods: setCancelableshowsetIndeterminatesetMessage

0
    } 
 
    @Override 
    protected void onPreExecute() { 
        super.onPreExecute(); 
        pd = new ProgressDialog(context);
        pd.setIndeterminate(true);
        pd.setCancelable(false);
        pd.setMessage("Cleaning up...");
        pd.show();
    } 
 
    @Override 
    protected Void doInBackground(Void... params) {
 
        // Clean tweets that are a older than a week 
        long tOld = System.currentTimeMillis() - WEEK;
 
        TweetDB tdb = TweetDB.getInstance(context.getApplicationContext()); // account id does not matter
        tdb.cleanStatusesAndUsers(tOld);
Connect your IDE to all the code out there  Get Codota for Java