i got a problem in updating progress bar. I am updating progress bar in separate Thread and the variable on which the progressbar progress is depending(which is a class variable
There are something wrong with your logic. Change your thread to following
Thread thread = new Thread()
{
public void run()
{
int prog = 0;
while(prog < 100)
{
progressBar.setProgress(prog);
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
prog ++;
}
}
};
thread.start();