What is the better practice for removing fragments (when the animation is not required) using
fragmentTransaction.remove
or
changing the fragment container view visibility to GONE – setVisibility(GONE);
What is the better practice for removing fragments (when the animation is not required)
Share
Removing the fragment will cause the entire fragment to be destroyed (onStop and onDestroy will be called).
Setting the visiblity to GONE will only hide the view from the user. The fragment instance will still exist and run through life cycle events.