- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
// Current Month Days
for (int i = 1; i <= _nDaysInMonth; i++) {
if (_myPrefs.getIfConfigured()) {
if (_regionWithHolidays != null && _regionWithHolidays.length > 0) {
String holidayDateStringFormat = String.valueOf(i) + "-" + getMonthAsString(nCurrentMonth) + "-" + _strCurrentSelectedYear;
for (int index = 0; index < _regionWithHolidays.length; index++) {
if (_regionWithHolidays[index].getHolidayDate().equals(holidayDateStringFormat)) {
list.add(String.valueOf(i) + "-RED" + "-" + getMonthAsString(nCurrentMonth) + "-" + yy);
}
}
}
}
if (i == getCurrentDayOfMonth()) {
list.add(String.valueOf(i) + "-BLUE" + "-" + getMonthAsString(nCurrentMonth) + "-" + yy);
} else {
list.add(String.valueOf(i) + "-WHITE" + "-" + getMonthAsString(nCurrentMonth) + "-" + yy);
if (_myPrefs.getIfConfigured()) {
if (_regionWithHolidays != null && _regionWithHolidays.length != 0) {
String otherDates = String.valueOf(i) + "-" + getMonthAsString(nCurrentMonth) + "-" + _strCurrentSelectedYear;
for (int index = 0; index < _regionWithHolidays.length; index++) {
if (_regionWithHolidays[index].getHolidayDate().equals(otherDates)) {
list.remove(String.valueOf(i) + "-WHITE" + "-" + getMonthAsString(nCurrentMonth) + "-" + yy);
}
}
}
}
}
}
// some code
for (int i = 1; i <= _nDaysInMonth; i++) {
String[] day_color = list.get(i).split("-");
if (day_color[1].equals("WHITE")) {
//active dates in current month
dayNumberView.setTextColor(getResources().getColor(R.color.darkGrey_font));
} else if (day_color[1].equals("BLUE")) {
//current date in current month
holder.tvTime.setTextColor(getResources().getColor(R.color.whitetranslucent));
dayNumberView.setTextColor(getResources().getColor(R.color.whitetranslucent));
cell.setBackgroundResource(R.color.blue_font);
} else if (day_color[1].equals("RED")) {
//active dates in current month
dayNumberView.setTextColor(getResources().getColor(R.color.red));
}
}