안녕하세요? 자바초보입니다..ㅠㅠ
xml을 파싱해와서 데이터를 제공해주는 어플을 만들고있는데요.
정보 업데이트가 thread에서 이루어지는데, 이 thread의 수행이 끝난뒤 pdlg(프로그레스바)를 종료(hide)시키려면
어디에다가, hide를 넣어야하나요?
thread는 자기 일 끝내면 자동으로 종료되는걸로 알고있는데.....
답변 미리 감사합니다.
pdlg = new ProgressDialog(this);
pdlg.setProgressStyle(ProgressDialog.THEME_HOLO_DARK);
pdlg.setMessage("업데이트중입니다...");
pdlg.setCancelable(false);
pdlg.show();
new Thread() {
public void run()
{
try {
mhelper.setData(getXmlData(url));
db = mhelper.getReadableDatabase();
mhelper.onUpdate(db);
}
catch (Exception e) { }
}
}.start();