Merge branch 'sasha_pasha_branch' of ssh://github.com/osmandapp/Osmand into sasha_pasha_branch
This commit is contained in:
commit
3380abede2
1 changed files with 14 additions and 2 deletions
|
@ -43,8 +43,20 @@ public class MapMarkersDialogFragment extends android.support.v4.app.DialogFragm
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
|
||||||
activeFragment = new MapMarkersActiveFragment();
|
List<Fragment> fragments = getChildFragmentManager().getFragments();
|
||||||
historyFragment = new MapMarkersHistoryFragment();
|
for (Fragment fragment : fragments) {
|
||||||
|
if (fragment instanceof MapMarkersActiveFragment) {
|
||||||
|
activeFragment = (MapMarkersActiveFragment) fragment;
|
||||||
|
} else if (fragment instanceof MapMarkersHistoryFragment) {
|
||||||
|
historyFragment = (MapMarkersHistoryFragment) fragment;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (activeFragment == null) {
|
||||||
|
activeFragment = new MapMarkersActiveFragment();
|
||||||
|
}
|
||||||
|
if (historyFragment == null) {
|
||||||
|
historyFragment = new MapMarkersHistoryFragment();
|
||||||
|
}
|
||||||
|
|
||||||
FragmentManager fragmentManager = getChildFragmentManager();
|
FragmentManager fragmentManager = getChildFragmentManager();
|
||||||
Fragment markerOptionsFragment = fragmentManager.findFragmentByTag(MarkerOptionsBottomSheetDialogFragment.TAG);
|
Fragment markerOptionsFragment = fragmentManager.findFragmentByTag(MarkerOptionsBottomSheetDialogFragment.TAG);
|
||||||
|
|
Loading…
Reference in a new issue