private void getNC() { List<NameValuePair> targVar = new ArrayList<NameValuePair>(); targVar.add( Wenku8Interface.getNovelContent(currentAid, currentCid, GlobalConfig.getFetchLanguage())); final asyncNovelContentTask ast = new asyncNovelContentTask(); ast.execute(targVar); pDialog = new ProgressDialog(parentActivity); pDialog.setTitle(getResources().getString(R.string.load_status)); pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); pDialog.setCancelable(true); pDialog.setOnCancelListener( new OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { // TODO Auto-generated method stub ast.cancel(true); pDialog.dismiss(); pDialog = null; } }); pDialog.setMessage(getResources().getString(R.string.load_loading)); pDialog.setProgress(0); pDialog.setMax(1); pDialog.show(); return; }