Move the code responsible for the play/pause animation to the onCreateView function instead of onResume.