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,901
  • 21
  • 84
  • 115
Marco D.
  • 133
  • 2
  • 17

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
  • 498
  • 5
  • 16