File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
library/src/main/java/com/flyjingfish/gradienttextviewlib Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,9 @@ public int[] getGradientStrokeColors() {
223223 public void setGradientStrokeColors (int [] gradientStrokeColors ) {
224224 this .gradientStrokeColors = gradientStrokeColors ;
225225 gradientStrokeColor = gradientStrokeColors != null ;
226+ if (gradientStrokePositions != null && gradientStrokeColors != null && gradientStrokeColors .length != gradientStrokePositions .length ){
227+ this .gradientStrokePositions = null ;
228+ }
226229 invalidate ();
227230 }
228231
@@ -242,6 +245,9 @@ public int[] getGradientColors() {
242245
243246 public void setGradientColors (int [] gradientColors ) {
244247 this .gradientColors = gradientColors ;
248+ if (gradientPositions != null && gradientColors != null && gradientColors .length != gradientPositions .length ){
249+ this .gradientPositions = null ;
250+ }
245251 invalidate ();
246252 }
247253
You can’t perform that action at this time.
0 commit comments