Reputation: 7988
I am able to set my shape's stroke color by doing this:
GradientDrawable shape = (GradientDrawable) myview.getBackground();
shape.setStroke(strokeWidth, color);
Q: How do I get the current color of my shape's stroke programmatically?
Note that I am using API level 19 (so I cannot use shape.getColor() which anyway would return the filling color of the shape I believe, and not it's stroke's color).
Upvotes: 2
Views: 322