Skip to content Skip to sidebar Skip to footer

Calling Ondraw() Method Of A Custom View In Android

I have created a CustomView for Calendar. I have an onDraw method to draw the text in the calendar. I want to change the color of the day Text when i click on it. How can i achieve

Solution 1:

Call mView.invalidate(); in your onClick() method for that View. This will call onDraw() (eventually), which will then run the drawing code for your view.


Post a Comment for "Calling Ondraw() Method Of A Custom View In Android"