From a071b60bd4ddb354db5ad30dbef34cae7f28b09e Mon Sep 17 00:00:00 2001 From: Vivek Vishwakarma Date: Thu, 8 Aug 2019 18:14:53 +0530 Subject: [PATCH] stroke width not changed update adding the rippleStrokeWidth to the paint object --- .../src/main/java/com/skyfishjy/library/RippleBackground.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/skyfishjy/library/RippleBackground.java b/library/src/main/java/com/skyfishjy/library/RippleBackground.java index a496418..2216194 100644 --- a/library/src/main/java/com/skyfishjy/library/RippleBackground.java +++ b/library/src/main/java/com/skyfishjy/library/RippleBackground.java @@ -79,8 +79,10 @@ private void init(final Context context, final AttributeSet attrs) { if(rippleType==DEFAULT_FILL_TYPE){ rippleStrokeWidth=0; paint.setStyle(Paint.Style.FILL); - }else + }else{ paint.setStyle(Paint.Style.STROKE); + paint.setStrokeWidth(rippleStrokeWidth); + } paint.setColor(rippleColor); rippleParams=new LayoutParams((int)(2*(rippleRadius+rippleStrokeWidth)),(int)(2*(rippleRadius+rippleStrokeWidth)));