I overrided the method showDialog(int) like this:
@Override
public Dialog onCreateDialog(int id ){
Log.d("Dialog",id+":created");
switch (id) {
case addressValidateProgressId:
addressValidateProgress = new AddressValidateProgress(this);
return addressValidateProgress;
case gpsSearchloadId:
gpsSearchload = new GPSSearchProgress(this,geocodeLocationToAddress);
return gpsSearchload;
case alertId:
prepareAddressChooseDialog(addressList);
return addressChooseDialog;
default:
return null;
}
}
This works fine, the dialog displays and change orientation with the screen.
The problem is, if i rotate the screen when i call dismissDialog(id) i get an exception saying that "java.lang.IllegalArgumentException: no dialog with id 0 was ever shown via Activity#showDialog".
The showDialog method shouldn't make the activity the owner of dialogs?
I can't see what is possible wrong.
Thanks.