void requestAccountList() { prog = ProgressDialog.show( this, null, getString(R.string.account_list_progress), false, true, new DialogInterface.OnCancelListener() { public void onCancel(DialogInterface dialog) { cancel(); } }); queryThread = new Thread(this, "Requestor Thread"); queryThread.setDaemon(true); queryThread.start(); }