Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private class AsyncTask extends AsyncTask<String , Integer , Bitmap>{
- @Override
- protected void onPreExecute() {
- //執行前 設定可以在這邊設定
- super.onPreExecute();
- }
- @Override
- protected Bitmap doInBackground(String... params) {
- //執行中 在背景做事情
- return null;
- }
- @Override
- protected void onProgressUpdate(Integer... values) {
- //執行中 可以在這邊告知使用者進度
- super.onProgressUpdate(values);
- }
- @Override
- protected void onPostExecute(Bitmap bitmap) {
- //執行後 完成背景任務
- super.onPostExecute(bitmap);
- }
- }
Add Comment
Please, Sign In to add comment