Today I lost a few hours because my functional code no longer worked. The code to reload the fragment view no longer worked after upgrading to the new version of Support Library 25.1.0:
This is my code:
FragmentManager manager = getActivity().getSupportFragmentManager(); FragmentTransaction fragmentTransaction = manager.beginTransaction(); fragmentTransaction.detach(fragment); fragmentTransaction.attach(fragment); fragmentTransaction.commit();
I tried debugging setting breakpoints on
public void onPause() public void onStop() public void onAttach(Context context) public void onDetach() public void onDestroyView() public void onDestroy()
but the application is not included in any of these functions, and nothing happened on the screen.
If I call the disconnect alone, without an application, the application enters onPause and onStop, and the view leaves the screen.
android android-fragments fragment android-support-library
Brahim Bouaboud Dec 21 '16 at 19:51 2016-12-21 19:51
source share