material-calendarview icon indicating copy to clipboard operation
material-calendarview copied to clipboard

add parameters to Decorate method to make it more flexible

Open mishindmitriy opened this issue 11 years ago • 2 comments

  • TextView dateText (e.g. for changing textColor to black, if background white)
  • boolean disable (for decorate disable days another background or textColor)

In my case, i need set Today white background and setTextColor to black, if it enabled. I can not do it now. http://joxi.ru/QeAOe7XiN6aYmo.jpg

Thank you.

mishindmitriy avatar Oct 27 '15 10:10 mishindmitriy

For changing text color, you should be able to use a ForegroundColorSpan. Ex:

dayViewFacade.addSpan(new ForegroundColorSpan(Color.WHITE));

I'm not sure what you are asking for in your second bullet point. DayViewFacade already has methods to set a background and disable days. If you're looking to decorate a set of days differently than another set, you can always add another decorator.

dandc87 avatar Oct 27 '15 16:10 dandc87

You helped me, thank you. I will be carefully reading the documentation)

mishindmitriy avatar Oct 28 '15 08:10 mishindmitriy