Skip to content

Instantly share code, notes, and snippets.

@ZZANZU
Last active March 26, 2023 10:50
Show Gist options
  • Save ZZANZU/b47948c1b91adb3dd09dd60e634f29e7 to your computer and use it in GitHub Desktop.
Save ZZANZU/b47948c1b91adb3dd09dd60e634f29e7 to your computer and use it in GitHub Desktop.
ExampleAsyncTask.kt
class ExampleTask extends AsyncTask<String, Void, String> {
protected String doInBackground(String... inputString) {
/*
* ...
* ...
* 백그라운드에서 작동할 복잡한 처리 구현
* ...
* ...
*/
return outputString; // 백그라운드 작업의 결과값 리턴
}
protected void onPostExecute(String outputString) {
// doInBackground()의 결과 값을 UI에 반영
textView.setText(outputString); // 텍스트뷰에 백그라운드 작업의 결과값을 표시함
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment