Set RippleDrawable corner radius programmatically
问题 I create a RippleDrawable like below. But I can't change the corner radius of the RippleDrawable. It doesn't have a method like setCornerRadii(float[] f) . public static RippleDrawable getPressedColorRippleDrawable(int normalColor, int pressedColor) { if (Build.VERSION.SDK_INT>=21) { RippleDrawable rippleDrawable = new RippleDrawable(getPressedColorSelector(normalColor, pressedColor), getColorDrawableFromColor(normalColor), null); //rippleDrawable.setRadius((int) Manager.convertDpToPixel(5));