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(); } |
출처 : http://arabiannight.tistory.com/entry/%EC%95%88%EB%93%9C%EB%A1%9C%EC%9D%B4%EB%93%9CAndroid-AsyncTask-%EC%82%AC%EC%9A%A9%EB%B2%95
doinbackground 에서 네트웤 작업을 해주시면 됩니다.
(자료를 땡겨와서 변수에 담는다던가 등 등.)
onPostExecute 에서 리스트뷰에 뿌린다던가 하는 UI를 건드리는 작업을 하시면 됩니다.
쓰레드 두개로 나누는게 있는데 조금만 검색해보시면 나올겁니다
구글은 신입니다.