Guest User

Untitled

a guest
Feb 15th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment