code: protected void processAnimations(FragmentAnimation animation, FragmentTransaction ft) {
          if (animation != null) {
              if (animation.isCompletedAnimation()) {
                  ft.setCustomAnimations(animation.getEnterAnim(), animation.getExitAnim(),
                          animation.getPushInAnim(), animation.getPopOutAnim());
              } else {
                  ft.setCustomAnimations(animation.getEnterAnim(), animation.getExitAnim());
              }
              if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
                  for (LollipopAnim sharedElement : animation.getSharedViews()) {
                      ft.addSharedElement(sharedElement.view, sharedElement.name);
                  }
          }
      }
docs: Processes the custom animations element, adding them as required
  
  @param animation Animation object to process
  @param ft        Fragment transaction to add to the transition