custom button: properties change, button should be redrawn
- by Rutger
Hi
I'm developing an Android app.
I have class derived from button to represent a special type of button.
This special type has some properties (integers) and according to these one or more circles have to be drawn on top of the button.
So I overrode the onDraw function, which looks the values up and accordingly draws the circles.
But the class has a function to set new values for its properties. So new values are set but the changes are not reflected in the UI. It seems like the onDraw function is not called.
When later I click the button or show a pop up message above my interface the onDraw function is called and the button is drawn correctly.
So my question: when changing the properties how can I say that the button has to be redrawn?
Thanks a lot!