@@ -123,8 +123,6 @@ public class WeekView extends View {
123
123
private Calendar mScrollToDay = null ;
124
124
private double mScrollToHour = -1 ;
125
125
private int mEventCornerRadius = 0 ;
126
- private boolean mUseDifferentPastBackgroundColor = false ;
127
- private boolean mUseDifferentFutureWeekendBackgroundColor = false ;
128
126
private boolean mShowDistinctWeekendColor = false ;
129
127
private boolean mShowNowLine = false ;
130
128
private boolean mShowDistinctPastFutureColor = false ;
@@ -1515,6 +1513,103 @@ public float getXScrollingSpeed() {
1515
1513
public void setXScrollingSpeed (float xScrollingSpeed ) {
1516
1514
this .mXScrollingSpeed = xScrollingSpeed ;
1517
1515
}
1516
+
1517
+ /**
1518
+ * Whether weekends should have a background color different from the normal day background
1519
+ * color. The weekend background colors are defined by the attributes
1520
+ * `futureWeekendBackgroundColor` and `pastWeekendBackgroundColor`.
1521
+ * @return True if weekends should have different background colors.
1522
+ */
1523
+ public boolean isShowDistinctWeekendColor () {
1524
+ return mShowDistinctWeekendColor ;
1525
+ }
1526
+
1527
+ /**
1528
+ * Set whether weekends should have a background color different from the normal day background
1529
+ * color. The weekend background colors are defined by the attributes
1530
+ * `futureWeekendBackgroundColor` and `pastWeekendBackgroundColor`.
1531
+ * @param showDistinctWeekendColor True if weekends should have different background colors.
1532
+ */
1533
+ public void setShowDistinctWeekendColor (boolean showDistinctWeekendColor ) {
1534
+ this .mShowDistinctWeekendColor = showDistinctWeekendColor ;
1535
+ invalidate ();
1536
+ }
1537
+
1538
+ /**
1539
+ * Whether past and future days should have two different background colors. The past and
1540
+ * future day colors are defined by the attributes `futureBackgroundColor` and
1541
+ * `pastBackgroundColor`.
1542
+ * @return True if past and future days should have two different background colors.
1543
+ */
1544
+ public boolean isShowDistinctPastFutureColor () {
1545
+ return mShowDistinctPastFutureColor ;
1546
+ }
1547
+
1548
+ /**
1549
+ * Set whether weekends should have a background color different from the normal day background
1550
+ * color. The past and future day colors are defined by the attributes `futureBackgroundColor`
1551
+ * and `pastBackgroundColor`.
1552
+ * @param showDistinctPastFutureColor True if past and future should have two different
1553
+ * background colors.
1554
+ */
1555
+ public void setShowDistinctPastFutureColor (boolean showDistinctPastFutureColor ) {
1556
+ this .mShowDistinctPastFutureColor = showDistinctPastFutureColor ;
1557
+ invalidate ();
1558
+ }
1559
+
1560
+ /**
1561
+ * Get whether "now" line should be displayed. "Now" line is defined by the attributes
1562
+ * `nowLineColor` and `nowLineThickness`.
1563
+ * @return True if "now" line should be displayed.
1564
+ */
1565
+ public boolean isShowNowLine () {
1566
+ return mShowNowLine ;
1567
+ }
1568
+
1569
+ /**
1570
+ * Set whether "now" line should be displayed. "Now" line is defined by the attributes
1571
+ * `nowLineColor` and `nowLineThickness`.
1572
+ * @param showNowLine True if "now" line should be displayed.
1573
+ */
1574
+ public void setShowNowLine (boolean showNowLine ) {
1575
+ this .mShowNowLine = showNowLine ;
1576
+ invalidate ();
1577
+ }
1578
+
1579
+ /**
1580
+ * Get the "now" line color.
1581
+ * @return The color of the "now" line.
1582
+ */
1583
+ public int getNowLineColor () {
1584
+ return mNowLineColor ;
1585
+ }
1586
+
1587
+ /**
1588
+ * Set the "now" line color.
1589
+ * @param nowLineColor The color of the "now" line.
1590
+ */
1591
+ public void setNowLineColor (int nowLineColor ) {
1592
+ this .mNowLineColor = nowLineColor ;
1593
+ invalidate ();
1594
+ }
1595
+
1596
+ /**
1597
+ * Get the "now" line thickness.
1598
+ * @return The thickness of the "now" line.
1599
+ */
1600
+ public int getNowLineThickness () {
1601
+ return mNowLineThickness ;
1602
+ }
1603
+
1604
+ /**
1605
+ * Set the "now" line thickness.
1606
+ * @param nowLineThickness The thickness of the "now" line.
1607
+ */
1608
+ public void setNowLineThickness (int nowLineThickness ) {
1609
+ this .mNowLineThickness = nowLineThickness ;
1610
+ invalidate ();
1611
+ }
1612
+
1518
1613
/////////////////////////////////////////////////////////////////
1519
1614
//
1520
1615
// Functions related to scrolling.
0 commit comments