@@ -33,6 +33,7 @@ public class GradientTextView extends AppCompatTextView {
3333 private float angle ;
3434 private boolean rtlAngle ;
3535 private boolean isRtl ;
36+ private int strokeTextColor ;
3637
3738 public GradientTextView (Context context ) {
3839 this (context , null );
@@ -54,7 +55,7 @@ public GradientTextView(Context context, AttributeSet attrs,
5455 int startStrokeColor = typedArray .getColor (R .styleable .GradientTextView_gradient_stroke_startColor , 0 );
5556 int centerStrokeColor = typedArray .getColor (R .styleable .GradientTextView_gradient_stroke_centerColor , 0 );
5657 int endStrokeColor = typedArray .getColor (R .styleable .GradientTextView_gradient_stroke_endColor , 0 );
57- int strokeTextColor = typedArray .getColor (R .styleable .GradientTextView_gradient_stroke_textColor , getCurrentTextColor ());
58+ strokeTextColor = typedArray .getColor (R .styleable .GradientTextView_gradient_stroke_textColor , getCurrentTextColor ());
5859 strokeAngle = typedArray .getFloat (R .styleable .GradientTextView_gradient_stroke_angle , 0 );
5960 strokeRtlAngle = typedArray .getBoolean (R .styleable .GradientTextView_gradient_stroke_rtl_angle , false );
6061
@@ -283,4 +284,14 @@ public void setRtlAngle(boolean rtlAngle) {
283284 this .rtlAngle = rtlAngle ;
284285 invalidate ();
285286 }
287+
288+ public int getStrokeTextColor () {
289+ return strokeTextColor ;
290+ }
291+
292+ public void setStrokeTextColor (int strokeTextColor ) {
293+ this .strokeTextColor = strokeTextColor ;
294+ backGroundText .setTextColor (strokeTextColor );
295+ invalidate ();
296+ }
286297}
0 commit comments