Reputation: 133
I got a little circle TextView from Vicky Vicent ("Android: Creating a Circular TextView?") In my situation this one should show a Level and I would like to define the background color for certain areas by myself. How can I change this one with my Activity?
<solid android:color="#9FE554" />
Upvotes: 0
Views: 100
Reputation: 538
To change the solid color of the xml drawable resource use the below code.
GradientDrawable bgShape = (GradientDrawable)textview.getBackground();
bgShape.setColor(Color.BLACK);
Upvotes: 1