How do I get out of an activity and restore it in exactly what it have in its previous state? In that activity, I have spinner. If i select 2nd item from drop-down, i get out from that activity and again go back, the activity is getting reloading. But i want to restore what exactly the activity have previously?
spinner.post(new Runnable() {
public void run() {
spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
dealerCd_fromDD = dealerInsp.getMap2().get(
dealerInsp.getLoadseqArray()[arg2]);
GlobalVehicle.setVehList(loadVehicles(dealerCd_fromDD));
loadHosts(GlobalVehicle.getVehList());
dealerDetails(dealerCd_fromDD, GlobalVehicle.getDealerObject());
loadDefaults(arg2);
pos=arg2;
deliveryInspDb.delete("damages");
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
}
});
}
});
Please any one can help me on this..
I tried to call finish(), but i am coming to that activity from 3 different activities. so in that situation its not working..