private void createAnimation ( final float x , final float y ) { if ( this . isEnabled ( ) && ! animationRunning ) { if ( hasToZoom ) this . startAnimation ( scaleAnimation ) ; radiusMax = Math . max ( WIDTH , HEIGHT ) ; if ( rippleType != 2 ) radiusMax /= 2 ; radiusMax -= ripplePadding ; if ( isCentered || rippleType == 1 ) { this . x = getMeasuredWidth ( ) / 2 ; this . y = getMeasuredHeight ( ) / 2 ; } else { this . x = x ; this . y = y ; } animationRunning = true ; if ( rippleType == 1 && originBitmap == null ) originBitmap = getDrawingCache ( true ) ; invalidate ( ) ; } }
Create Ripple animation centered at x y