Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Feb 7, 2018
1 parent 61d19bd commit 0aaa8d5
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,19 @@ private void drawLunarText(Canvas canvas, int selected) {
for (int i = 0; i < 7; i++) {
if (day > days) {
day = 1;
boolean isAdd = true;
if (lunar.lunarMonth == 12) {
lunar.lunarMonth = 1;
lunar.lunarYear = lunar.lunarYear + 1;
isAdd = false;
}
if (lunar.lunarMonth == leapMonth) {
days = LunarCalendarUtils.daysInMonth(lunar.lunarYear, lunar.lunarMonth, lunar.isLeap);
} else {
lunar.lunarMonth++;
days = LunarCalendarUtils.daysInLunarMonth(lunar.lunarYear, lunar.lunarMonth);
if (isAdd) {
lunar.lunarMonth++;
days = LunarCalendarUtils.daysInLunarMonth(lunar.lunarYear, lunar.lunarMonth);
}
}
}
mLunarPaint.setColor(mHolidayTextColor);
Expand All @@ -287,6 +291,9 @@ private void drawLunarText(Canvas canvas, int selected) {
dayString = LunarCalendarUtils.getLunarDayString(day);
mLunarPaint.setColor(mLunarTextColor);
}
if ("初一".equals(dayString)) {
dayString = LunarCalendarUtils.getLunarFirstDayString(lunar.lunarMonth, lunar.isLeap);
}
if (i == selected) {
mLunarPaint.setColor(mSelectDayColor);
}
Expand Down

0 comments on commit 0aaa8d5

Please sign in to comment.