ASYTAST线程规范示例
@Overrideprotected void onCreate(Bundle savedInstanceState) {// TODO Auto-generated method stubsuper.onCreate(savedInstanceState);MyAsyTast asytast =new MyAsyTast();asytast.execute();}private class MyAsyTast extends AsyncTask<Integer, String, String>{private ProgressDialog dialog;@Overrideprotected String doInBackground(Integer... params) {if (isCancelled()) {return null;}//处理事务之前的操作,或者是接收获取数据等待处理return null;}@Overrideprotected void onPostExecute(String result) {super.onPostExecute(result);if (GrouponOrderCheck01.this.isFinishing()) {return ;}if (dialog!=null) {dialog.cancel();}if (isCancelled()) {return;}//处理事件}@Overrideprotected void onPreExecute() {super.onPreExecute();dialog =DialogHelper.createProgressDialog(GrouponOrderCheck01.this);}@Overrideprotected void onProgressUpdate(String... values) {super.onProgressUpdate(values);if (isCancelled()) {return;}}}?