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 ) ; } } }
Processes the custom animations element adding them as required