I accept that I am not master in fragment manager. But I expect that two similar BottomSheets behave similarly.
I have a CustomBottomSheet (extend of BottomSheetDialogFragment). I have created a new instance of that in fragment A and another new instance of that inside of the MyUtility class:
FragmentA
MyUtility mu = new MyUtility(FragmentA.this);
CustomBottomSheet.NewInstance().show(getChildFragmentManager(), null);
And in MyUtility.java
CustomBottomSheet.NewInstance().show(fragment.getChildFragmentManager(), null);
for getting the results of these bottom Sheets first one needs getParentFragmentManager().setFragmentResultListener ... and second one needs getChildFragmentManager().setFragmentResultListener ....
Why do they behave differently?