private static Drawable getRippleMask ( int color , int radius ) { float [ ] outerRadius = new float [ 8 ] ; Arrays . fill ( outerRadius , radius ) ; RoundRectShape r = new RoundRectShape ( outerRadius , null , null ) ; ShapeDrawable shapeDrawable = new ShapeDrawable ( r ) ; shapeDrawable . getPaint ( ) . setColor ( color ) ; return shapeDrawable ; }
helper to create an ripple mask with the given color and radius