Issue #57 new

Changing color in PieGraph doesn't work

Anonymous created an issue

Hi,

I implemented the onSliceClickedListenner to change the color of all the slices except the one which is clicked. I proceed like that :

for (int i = 0 ; i < nbSlices ; i++) { if (index != i) { pg.getSlice(i).setColor(ColorTransparent[i]); } }

When no slice is clicked it's work perfectly but if there is one slice already changed the new modification of color doesn't appear. The strange thing is, if I click in the view but not on a slice the slices show the correct colors. Same if I lock/unlock the phone or minize and relaunch the app.

Hope you could help me ^^

Comments (2)

  1. Khanyrr

    That worked ^^ I'm new in Android Development and didn't know about this function. That's very helpfull. Thanks a lot for you very quick answer ;)

  2. Log in to comment