friends,
i am using following code to display progress on andorid activity when i call web service method to getposts it show progress. but when call of serivce is complete my application gets crashed.
please guide what mistake am i doing or any other alternative way to achieve this goal?
mProgressStatus = 0;
Thread th=new Thread(new Runnable() {
public void run() {
if (mProgressStatus < 100) {
myProgressBar.setVisibility(View.VISIBLE);
} else {
myProgressBar.setVisibility(View.GONE);
}
}
});
th.start();
results = p.GetPosts(p, PageSize, adap.getCount());
mProgressStatus=100;
th.stop();