public void willBeDisplayed(){
  if (fragmentContainer != null) {
    Animation fadeIn=AnimationUtils.loadAnimation(getActivity(),R.anim.fade_in);
    fragmentContainer.startAnimation(fadeIn);
  }
}

public void willBeDisplayed ( ) { if ( fragmentContainer != null ) { Animation fadeIn = AnimationUtils . loadAnimation ( getActivity ( ) , R . anim . fade_in ) ; fragmentContainer . startAnimation ( fadeIn ) ; } }
called when a fragment will be displayed
