How to change stroke color dynamically?

前端 未结 1 619
南方客
南方客 2021-02-15 10:15

(Sorry for my language, I\'m french)

I need to change the stroke color of a Shape. I\'ve the same problem described here. I need to change solid color when

1条回答
  •  爱一瞬间的悲伤
    2021-02-15 11:13

    GradientDrawable myGrad = (GradientDrawable)rectangle.getBackground();
    myGrad.setStroke(2, Color.RED);
    

    0 讨论(0)
提交回复
热议问题