File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/core/platforms/android/java/com/nativescript/material/core Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -67,12 +67,17 @@ public static ShapeDrawable createForegroundShape(float radius) {
67
67
}
68
68
69
69
public static Drawable createRippleDrawable (int rippleColor , float radius ) {
70
- ShapeDrawable rippleShape = radius != 0 ? createForegroundShape (radius ) : null ;
71
70
if (Build .VERSION .SDK_INT >= 22 ) {
71
+ ShapeDrawable rippleShape = radius != 0 ? createForegroundShape (radius ) : null ;
72
72
return new RippleDrawable (ColorStateList .valueOf (rippleColor ), null , rippleShape );
73
73
} else {
74
+ ShapeDrawable rippleShape = createForegroundShape (radius );
74
75
StateListDrawable rippleDrawable = new StateListDrawable ();
75
- rippleShape .getPaint ().setColor (rippleColor );
76
+ if (rippleShape != null ) {
77
+ rippleShape .getPaint ().setColor (rippleColor );
78
+ } else {
79
+
80
+ }
76
81
rippleDrawable .addState (new int [] { statePressed }, rippleShape );
77
82
return rippleShape ;
78
83
}
You can’t perform that action at this time.
0 commit comments