Up button navigation now doing same as back button.
This commit is contained in:
parent
e4f786cbaa
commit
41ea53257e
1 changed files with 11 additions and 7 deletions
|
@ -135,7 +135,7 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
dismissCheckForChanges();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -337,12 +337,7 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
LOG.debug("onKey hasChangesBeenMade" + editPoiData.hasChangesBeenMade());
|
||||
return true;
|
||||
} else {
|
||||
if (editPoiData.hasChangesBeenMade()) {
|
||||
new AreYouSureDialogFragment().show(getChildFragmentManager(),
|
||||
"AreYouSureDialogFragment");
|
||||
} else {
|
||||
dismiss();
|
||||
}
|
||||
dismissCheckForChanges();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -351,6 +346,15 @@ public class EditPoiDialogFragment extends DialogFragment {
|
|||
});
|
||||
}
|
||||
|
||||
private void dismissCheckForChanges() {
|
||||
if (editPoiData.hasChangesBeenMade()) {
|
||||
new AreYouSureDialogFragment().show(getChildFragmentManager(),
|
||||
"AreYouSureDialogFragment");
|
||||
} else {
|
||||
dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
outState.putSerializable(TAGS_LIST, (Serializable) editPoiData.getTagValues());
|
||||
|
|
Loading…
Reference in a new issue