daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Feb 15th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private class AsyncTask extends AsyncTask<String , Integer , Bitmap>{
  2.  
  3.         @Override
  4.         protected void onPreExecute() {
  5.             //執行前 設定可以在這邊設定
  6.             super.onPreExecute();
  7.         }
  8.  
  9.         @Override
  10.         protected Bitmap doInBackground(String... params) {
  11.             //執行中 在背景做事情
  12.             return null;
  13.         }
  14.  
  15.         @Override
  16.         protected void onProgressUpdate(Integer... values) {
  17.             //執行中 可以在這邊告知使用者進度
  18.             super.onProgressUpdate(values);
  19.         }
  20.  
  21.         @Override
  22.         protected void onPostExecute(Bitmap bitmap) {
  23.             //執行後 完成背景任務
  24.             super.onPostExecute(bitmap);
  25.         }
  26.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top