본문 바로가기

정보기술, IT/IT source

Android onPreExecute() -> doInBackground() -> onPostExecute()

반응형

1. onPreExecute() : Background 작업 시작전에 UI 작업을 진행 한다.

 @Override 
 protected void onPreExecute() {
       super.onPreExecute(); 
 }


2. doInBackground() : Background 작업을 진행 한다.

 @Override 
 protected String doInBackground(String... params) {
       super.onPreExecute(); 
 }


3. onPostExecute() : Background 작업이 끝난 후 UI 작업을 진행 한다.

 @Override 
 protected void onPostExecute(String result) 
{
       super.onPreExecute(); 
 }



FLOW를 살펴 보자면,

[onPreExecute()] -> [doInBackground()] -> [onPostExecute()] 순서가 됩니다.

반응형