private Boolean isFragmentAdded(String tag) { FragmentManager manager = getSupportFragmentManager(); List<Fragment> fragmentList = manager.getFragments(); if (fragmentList != null) { for (int i = fragmentList.size() - 1; i > -1; i--) { Fragment fragment = fragmentList.get(i); if (fragment != null && fragment.getClass().getName().equals(tag) && !fragment.isRemoving()) return true; } } return false; }
public boolean isRemoving() { return zzadh.isRemoving(); }