add setRetainInstance for keeping progressDialog and it`s fragmentManager

This commit is contained in:
Chumva 2018-05-11 12:46:23 +03:00
parent bc3745e28d
commit dc6217c9aa

View file

@ -91,11 +91,12 @@ public class UploadOpenstreetmapPointAsyncTask
} }
}); });
progress.setMax(listSize); progress.setMax(listSize);
progress.setRetainInstance(true);
} }
@Override @Override
protected void onPostExecute(Map<OsmPoint, String> loadErrorsMap) { protected void onPostExecute(Map<OsmPoint, String> loadErrorsMap) {
if (progress != null && progress.isResumed()) { if (progress != null) {
progress.dismissAllowingStateLoss(); progress.dismissAllowingStateLoss();
} }
listener.uploadEnded(loadErrorsMap); listener.uploadEnded(loadErrorsMap);