Skip to content

Commit 892133c

Browse files
committed
Set Calendar on WeekView - noOfVisibleDays="7"
Set Calendar on WeekView - noOfVisibleDays="7" issue 132 Fix.
1 parent 39fd130 commit 892133c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/alamkanak/weekview/WeekView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ private void drawHeaderRowAndEvents(Canvas canvas) {
400400

401401
// If the week view is being drawn for the first time, then consider the first day of the week.
402402
if(mNumberOfVisibleDays >= 7 && mToday.get(Calendar.DAY_OF_WEEK) != mFirstDayOfWeek) {
403-
int difference = 7 + (mToday.get(Calendar.DAY_OF_WEEK) - mFirstDayOfWeek);
403+
int difference = (7 + (mToday.get(Calendar.DAY_OF_WEEK) - mFirstDayOfWeek)) % 7;
404404
mCurrentOrigin.x += (mWidthPerDay + mColumnGap) * difference;
405405
}
406406
}

0 commit comments

Comments
 (0)