@@ -339,11 +339,9 @@ public WeekView(Context context, AttributeSet attrs, int defStyleAttr) {
339
339
mEventMarginVertical = a .getDimensionPixelSize (R .styleable .WeekView_eventMarginVertical , mEventMarginVertical );
340
340
mXScrollingSpeed = a .getFloat (R .styleable .WeekView_xScrollingSpeed , mXScrollingSpeed );
341
341
mEventCornerRadius = a .getDimensionPixelSize (R .styleable .WeekView_eventCornerRadius , mEventCornerRadius );
342
-
343
342
mShowDistinctPastFutureColor = a .getBoolean (R .styleable .WeekView_showDistinctPastFutureColor , mShowDistinctPastFutureColor );
344
343
mShowDistinctWeekendColor = a .getBoolean (R .styleable .WeekView_showDistinctWeekendColor , mShowDistinctWeekendColor );
345
344
mShowNowLine = a .getBoolean (R .styleable .WeekView_showNowLine , mShowNowLine );
346
-
347
345
mHorizontalFlingEnabled = a .getBoolean (R .styleable .WeekView_horizontalFlingEnabled , mHorizontalFlingEnabled );
348
346
mVerticalFlingEnabled = a .getBoolean (R .styleable .WeekView_verticalFlingEnabled , mVerticalFlingEnabled );
349
347
} finally {
@@ -1685,18 +1683,34 @@ public void setNowLineThickness(int nowLineThickness) {
1685
1683
invalidate ();
1686
1684
}
1687
1685
1686
+ /**
1687
+ * Get whether the week view should fling horizontally.
1688
+ * @return True if the week view has horizontal fling enabled.
1689
+ */
1688
1690
public boolean isHorizontalFlingEnabled () {
1689
1691
return mHorizontalFlingEnabled ;
1690
1692
}
1691
1693
1694
+ /**
1695
+ * Set whether the week view should fling horizontally.
1696
+ * @return True if it should have horizontal fling enabled.
1697
+ */
1692
1698
public void setHorizontalFlingEnabled (boolean enabled ) {
1693
1699
mHorizontalFlingEnabled = enabled ;
1694
1700
}
1695
1701
1702
+ /**
1703
+ * Get whether the week view should fling vertically.
1704
+ * @return True if the week view has vertical fling enabled.
1705
+ */
1696
1706
public boolean isVerticalFlingEnabled () {
1697
1707
return mVerticalFlingEnabled ;
1698
1708
}
1699
1709
1710
+ /**
1711
+ * Set whether the week view should fling vertically.
1712
+ * @return True if it should have vertical fling enabled.
1713
+ */
1700
1714
public void setVerticalFlingEnabled (boolean enabled ) {
1701
1715
mVerticalFlingEnabled = enabled ;
1702
1716
}
0 commit comments