This commit is contained in:
androiddevkotlin 2021-03-01 15:48:07 +02:00
parent 1985928d60
commit 4c04c7ee19
2 changed files with 5 additions and 4 deletions

View file

@ -139,8 +139,9 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment {
public boolean onTouch(final View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP) {
FragmentManager fragmentManager = getFragmentManager();
if (fragmentManager != null) {
SelectFavoriteCategoryBottomSheet.showInstance(getChildFragmentManager(), getTargetFragment());
SelectFavoriteCategoryBottomSheet dialogFragment = createSelectCategoryDialog();
if (fragmentManager != null && dialogFragment != null) {
dialogFragment.showInstance(getChildFragmentManager(), getTargetFragment());
}
return true;
}
@ -178,7 +179,7 @@ public abstract class PointEditorFragment extends BaseOsmAndFragment {
}
@Nullable
protected BottomSheetDialogFragment createSelectCategoryDialog() {
protected SelectFavoriteCategoryBottomSheet createSelectCategoryDialog() {
PointEditor editor = getEditor();
if (editor != null) {
return SelectFavoriteCategoryBottomSheet.createInstance(editor.getFragmentTag());

View file

@ -194,7 +194,7 @@ public abstract class PointEditorFragmentNew extends BaseOsmAndFragment implemen
public void onClick(View v) {
FragmentManager fragmentManager = getFragmentManager();
SelectFavoriteCategoryBottomSheet dialogFragment = createSelectCategoryDialog();
if (fragmentManager != null) {
if (fragmentManager != null && dialogFragment != null) {
dialogFragment.showInstance(getChildFragmentManager(), getTargetFragment());
}
}