Code example for ProgressDialog

Methods: setTitlesetIndeterminatesetMessage, setCancelable, show

0
    /** 
     * Zips the file that Box sent to us and triggers an upload back to Box. 
     */ 
    private void doZip() { 
 
        final ProgressDialog dialog = new ProgressDialog(this);
        dialog.setIndeterminate(true);
        dialog.setTitle("Making zip file");
        dialog.setMessage("Please wait...");
        dialog.setCancelable(false);
        dialog.show();
 
        final Handler handler = new Handler();
 
        new Thread() {
 
            @Override 
            public void run() { 
                try { 
 
                    // We can get input and output streams to read/write data.