Rearrange code

This commit is contained in:
PavelRatushnyi 2017-10-25 19:57:43 +03:00
parent 84b3b34be8
commit f89c305d38

View file

@ -94,18 +94,6 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
private boolean compassUpdateAllowed = true; private boolean compassUpdateAllowed = true;
private MapMarkersHelper mapMarkersHelper; private MapMarkersHelper mapMarkersHelper;
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
return new Dialog(getContext(), getTheme()) {
@Override
public void onBackPressed() {
saveMarkers();
super.onBackPressed();
}
};
}
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -121,6 +109,18 @@ public class CoordinateInputDialogFragment extends DialogFragment implements Osm
fragment.show(getMapActivity().getSupportFragmentManager(), CoordinateInputBottomSheetDialogFragment.TAG); fragment.show(getMapActivity().getSupportFragmentManager(), CoordinateInputBottomSheetDialogFragment.TAG);
} }
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
return new Dialog(getContext(), getTheme()) {
@Override
public void onBackPressed() {
saveMarkers();
super.onBackPressed();
}
};
}
@Nullable @Nullable
@Override @Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {