0

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" />
Phantômaxx
  • 37,352
  • 21
  • 80
  • 110
Marco D.
  • 133
  • 1
  • 14

1 Answers1

1

To change the solid color of the xml drawable resource use the below code.

GradientDrawable bgShape = (GradientDrawable)textview.getBackground();
bgShape.setColor(Color.BLACK);
Tarun Kumar
  • 488
  • 4
  • 15