直接上代码:
showDialog(ID_DLG_LOADING);
new AsyncTask<String, Integer, BarcodeResults>(){
@Override
protected BarcodeResults doInBackground(
String... paramArrayOfParams) {
BarcodeResults result = .......;
return result;
}
@Override
protected void onPostExecute(BarcodeResults result) {
AppUtils.closeDialog(MobileBarcodeHistoryActivity.this, ID_DLG_LOADING);
}
}.execute(barcode);