如果记录被提取,我想停止我的帖子请帮助我。这是我的代码。
if (dialog==null) {
dialog = ProgressDialog.show(AgentProgress.this, "",
"Fetching Records...", true);
new Thread(new Runnable() {
public void run() {
try {
Thread.sleep(5000);
loadnames load1 = new loadnames();
load1.execute("");
} catch (InterruptedException e) {
Thread.currentThread().interrupt(); //this is a MUST
}
}
}).start();
}
在此加载名中,如果获取名称则获取名称,然后线程将停止。