clean context after fragment is destroyed

This commit is contained in:
Milos Kozak 2017-06-28 10:24:42 +02:00
parent e4d55473a1
commit 39e83f0cfe
3 changed files with 18 additions and 0 deletions

View file

@ -141,6 +141,12 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
super.onAttach(activity);
}
@Override
public void onDetach() {
super.onDetach();
this.context = null;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {

View file

@ -46,6 +46,12 @@ public class CalibrationDialog extends DialogFragment implements View.OnClickLis
this.context = context;
}
@Override
public void onDetach() {
super.onDetach();
this.context = null;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {

View file

@ -123,6 +123,12 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
this.context = context;
}
@Override
public void onDetach() {
super.onDetach();
this.context = null;
}
@Override
public void onResume() {
super.onPause();