AsyncTask 메서드 내에서 ProgressDialog
을 실행할 수 없습니다. 그것은 나에게 다음과 같은 오류가 있습니다 :왜 AsyncTask의 doInBackground 메서드 내에서 ProgressDialog를 실행할 수 없습니까?
ERROR/AndroidRuntime(12986): Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
을 그리고 오류 코드에서이 줄에 :
final ProgressDialog dialog = ProgressDialog.show(GalleryView.this, "Refresh", "Loading... please wait", true);
어떤 도움이 많이 감사합니다.
좋아,이게 내가하려는 일이다. progressdialog를 코드 조각으로 실행하고 싶습니다. 코드가 끝나면 대화 상자를 닫고 AsyncTask를 호출하여 UI를 새로 고칩니다. 나는 이것을 성취 할 수 없다. –