-
public final class DayColorsUtils
-
-
Method Summary
Modifier and Type Method Description final static UnitsetDayColors(TextView $self, Integer textColor, Typeface typeface, Integer backgroundRes)This is general method which sets a color of the text, font type and a background of a TextView object. final static UnitsetSelectedDayColors(TextView dayLabel, Calendar calendar, CalendarProperties calendarProperties)This method sets a color of the text, font type and a background of a TextView object. final static UnitsetCurrentMonthDayColors(Calendar calendar, TextView dayLabel, CalendarProperties calendarProperties)This method is used to set a color of texts, font types and backgrounds of TextView objects in a current visible month. final static IntegerparseColor(Context $self, @ColorRes() Integer colorRes)-
-
Method Detail
-
setDayColors
final static Unit setDayColors(TextView $self, Integer textColor, Typeface typeface, Integer backgroundRes)
This is general method which sets a color of the text, font type and a background of a TextView object. It is used to set day cell (numbers) style.
- Parameters:
textColor- A resource of a color of the day numberbackgroundRes- A resource of a background drawable
-
setSelectedDayColors
final static Unit setSelectedDayColors(TextView dayLabel, Calendar calendar, CalendarProperties calendarProperties)
This method sets a color of the text, font type and a background of a TextView object. It is used to set day cell (numbers) style in the case of selected day (when calendar is in the picker mode). It also colors a background of the selection.
- Parameters:
dayLabel- TextView containing a day numbercalendarProperties- A resource of a selection background color
-
setCurrentMonthDayColors
final static Unit setCurrentMonthDayColors(Calendar calendar, TextView dayLabel, CalendarProperties calendarProperties)
This method is used to set a color of texts, font types and backgrounds of TextView objects in a current visible month. Visible day labels from previous and forward months are set using setDayColors() method. It also checks if a day number is a day number of today and set it a different color and bold face type.
- Parameters:
calendar- A calendar instance representing day datedayLabel- TextView containing a day numbercalendarProperties- A resource of a color used to mark today day
-
parseColor
final static Integer parseColor(Context $self, @ColorRes() Integer colorRes)
-
-
-
-