Earlier this code was working but it now it suddenly stopped working. Fragment is not detaching from parent activity.
public void reLoadFragment(Fragment fragment) { Log.i(LogGeneratorHelper.INFO_TAG, "reloading fragment"); // Reload current fragment Fragment frg = null; frg = getSupportFragmentManager().findFragmentByTag(fragment.getClass().getName()); frg.onDetach(); final FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.detach(frg); ft.attach(frg); ft.commit(); Log.i(LogGeneratorHelper.INFO_TAG, "reloading fragment finish"); }