public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Init();
backthread tr=new backthread();
tr.execute(0,0,0);
}
backthread is a class implements AsyncTask
when the program runing in MainActivity ,the progressbar’s value will increase from 0 to 100 (change its value in backthread),but when i go into other activity and turn back ,the progressbar will restart from 0 to 100 , i want progressbar’s value continue increase when i go into other activity and turn back; what should i do ?
I think you can keep a int variable in currentUptae in backthread class and in onProgressUpdaete update this variable as well.
create the getter and setter for and just upate the progress bar by this currentUptae variable in OnRestart or onStart ……..