File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
library/src/main/java/com/alamkanak/weekview Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ private enum Direction {
92
92
private boolean mIsZooming ;
93
93
private Calendar mFirstVisibleDay ;
94
94
private Calendar mLastVisibleDay ;
95
+ private boolean mshowFirstDayOfWeekFirst = false ;
95
96
private int mDefaultEventColor ;
96
97
private int mMinimumFlingVelocity = 0 ;
97
98
private int mScaledTouchSlop = 0 ;
@@ -536,8 +537,8 @@ private void drawHeaderRowAndEvents(Canvas canvas) {
536
537
mIsFirstDraw = false ;
537
538
538
539
// If the week view is being drawn for the first time, then consider the first day of the week.
539
- if (mNumberOfVisibleDays >= 7 && today .get (Calendar .DAY_OF_WEEK ) != mFirstDayOfWeek ) {
540
- int difference = 7 + (today .get (Calendar .DAY_OF_WEEK ) - mFirstDayOfWeek );
540
+ if (mNumberOfVisibleDays >= 7 && today .get (Calendar .DAY_OF_WEEK ) != mFirstDayOfWeek && mshowFirstDayOfWeekFirst ) {
541
+ int difference = (today .get (Calendar .DAY_OF_WEEK ) - mFirstDayOfWeek );
541
542
mCurrentOrigin .x += (mWidthPerDay + mColumnGap ) * difference ;
542
543
}
543
544
}
@@ -1339,6 +1340,14 @@ public void setFirstDayOfWeek(int firstDayOfWeek) {
1339
1340
invalidate ();
1340
1341
}
1341
1342
1343
+ public boolean isShowFirstDayOfWeekFirst () {
1344
+ return mshowFirstDayOfWeekFirst ;
1345
+ }
1346
+
1347
+ public void setShowFirstDayOfWeekFirst (boolean show ) {
1348
+ mshowFirstDayOfWeekFirst = show ;
1349
+ }
1350
+
1342
1351
public int getTextSize () {
1343
1352
return mTextSize ;
1344
1353
}
You can’t perform that action at this time.
0 commit comments