Asynctask사용 하는 경우

asynctask에서 progressdialog가 안뜨고 activity가 asynctask가 끝날때까지 안떠서 확인하니
get()을 쓰면 synctask개념이 된다고 한다.
obj = dailyWorkAsyncTask.execute().get(); -> synctask개념이 되어 progressDialog가 안나옴
https://stackoverflow.com/questions/9019249/progressdialog-not-shown-when-asynctask-get-called

 

progressDialog 가 나오지 않는 경우 get 대신에 postExecute에서 콜백함수를 쓰는 방법이 있다
https://stackoverflow.com/questions/9019249/progressdialog-not-shown-when-asynctask-get-called

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s