private static String getStyleNameFromAnimation ( final String animation , int count , int duration , int delay ) { // fix input if ( count < 0 ) count = - 1 ; if ( duration < 0 ) duration = - 1 ; if ( delay < 0 ) delay = - 1 ; String styleName = "" ; // for all valid animations if ( animation != null && ! animation . isEmpty ( ) && animation . split ( " " ) . length > 1 ) { styleName += animation . split ( " " ) [ 1 ] + "-" + count + "-" + duration + "-" + delay ; // for all custom animations } else if ( animation != null && ! animation . isEmpty ( ) && animation . split ( " " ) . length == 1 ) { styleName += animation + "-" + count + "-" + duration + "-" + delay ; } return styleName ; }
Helper method which returns unique class name for combination of animation and it s settings .