Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

选择其他日期时当前日期取消选中效果 #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down