circularseekbar icon indicating copy to clipboard operation
circularseekbar copied to clipboard

Programmatically setting attributes instead of XML values?

Open basememara opened this issue 9 years ago • 2 comments

I have 2 circles in the same fragment that need different properties, such as start/end angles, radii, lock, etc, and also need to be dynamically configured at runtime. Is there a way to set the attributes of the circle programmatically instead of in the XML?

basememara avatar Aug 09 '15 18:08 basememara

Some of the attributes are already configurable at runtime (color, lock, max, etc.) but things like the start and end angles are not. In theory, the others can be added, as it's just a matter of updating the values, and invalidating the state to cause a redraw.

devadvance avatar Aug 14 '15 03:08 devadvance

i've a problem setting the in oncreate CircularSeekBar cs = (CircularSeekBar)findViewById(R.id.circularSeekBar1); cs.setCircleProgressColor(R.color.red); the blue is pale, but its still blue and not red ;)

if i set it using xml, with the same R.color.red all works fine... thanks

edit if i set the color using cs.setCircleProgressColor(Color.argb(235, 255, 0, 0)); instead of #FF0033 all works fine is this by design?

meta0102 avatar Sep 10 '15 17:09 meta0102