diff --git a/.idea/modules.xml b/.idea/modules.xml index 173c330c..08bfa1f0 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,7 +3,6 @@ - diff --git a/build.gradle b/build.gradle index b14c3586..0aea6bb6 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' + classpath 'com.android.tools.build:gradle:3.0.1' // classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' // classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' diff --git a/ncalendar/src/main/java/com/necer/ncalendar/view/MonthView.java b/ncalendar/src/main/java/com/necer/ncalendar/view/MonthView.java index 3eebe19a..ae8219cc 100644 --- a/ncalendar/src/main/java/com/necer/ncalendar/view/MonthView.java +++ b/ncalendar/src/main/java/com/necer/ncalendar/view/MonthView.java @@ -67,7 +67,7 @@ protected void onDraw(Canvas canvas) { //当月和上下月的颜色不同 if (Utils.isEqualsMonth(dateTime, mInitialDateTime)) { //当天和选中的日期不绘制农历 - if (Utils.isToday(dateTime)) { + if (Utils.isToday(dateTime) && dateTime.isEqual(mSelectDateTime)) { mSorlarPaint.setColor(mSelectCircleColor); int centerY = mRowNum == 5 ? rect.centerY() : (rect.centerY() + (mHeight / 5 - mHeight / 6) / 2); canvas.drawCircle(rect.centerX(), centerY, mSelectCircleRadius, mSorlarPaint); diff --git a/ncalendar/src/main/java/com/necer/ncalendar/view/WeekView.java b/ncalendar/src/main/java/com/necer/ncalendar/view/WeekView.java index 92816324..0de12f5a 100644 --- a/ncalendar/src/main/java/com/necer/ncalendar/view/WeekView.java +++ b/ncalendar/src/main/java/com/necer/ncalendar/view/WeekView.java @@ -55,7 +55,7 @@ protected void onDraw(Canvas canvas) { Paint.FontMetricsInt fontMetrics = mSorlarPaint.getFontMetricsInt(); int baseline = (rect.bottom + rect.top - fontMetrics.bottom - fontMetrics.top) / 2; - if (Utils.isToday(dateTime)) { + if (Utils.isToday(dateTime) && dateTime.isEqual(mSelectDateTime)) { mSorlarPaint.setColor(mSelectCircleColor); canvas.drawCircle(rect.centerX(), rect.centerY(), mSelectCircleRadius, mSorlarPaint); mSorlarPaint.setColor(Color.WHITE);