Skip to content

Commit

Permalink
修改部分参数注释
Browse files Browse the repository at this point in the history
  • Loading branch information
yannecer committed Mar 25, 2020
1 parent 20ffa9e commit e6e8b08
Show file tree
Hide file tree
Showing 8 changed files with 408 additions and 121 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
1 change: 0 additions & 1 deletion .idea/gradle.xml

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

36 changes: 36 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import java.util.List;

/**
* Created by necer on 2019/1/3.
* @author necer
* @date 2019/1/3
*/
public interface CalendarPainter {

Expand Down
10 changes: 6 additions & 4 deletions ncalendar/src/main/java/com/necer/painter/InnerPainter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
import java.util.Map;

/**
* Created by necer on 2019/1/3.
*
* @author necer
* @date 2019/1/3
*/
public class InnerPainter implements CalendarPainter {

Expand Down Expand Up @@ -182,12 +184,12 @@ private void drawSolar(Canvas canvas, RectF rectF, LocalDate date, int color, in
mTextPaint.setColor(color);
mTextPaint.setAlpha(alphaColor);
mTextPaint.setTextSize(mAttrs.solarTextSize);
canvas.drawText(date.getDayOfMonth() + "", rectF.centerX(), mAttrs.isShowLunar ? rectF.centerY() : getTextBaseLineY(rectF.centerY()), mTextPaint);
canvas.drawText(date.getDayOfMonth() + "", rectF.centerX(), mAttrs.showLunar ? rectF.centerY() : getTextBaseLineY(rectF.centerY()), mTextPaint);
}

//绘制农历
private void drawLunar(Canvas canvas, RectF rectF, LocalDate localDate, int color, int alphaColor) {
if (mAttrs.isShowLunar) {
if (mAttrs.showLunar) {
CalendarDate calendarDate = CalendarUtil.getCalendarDate(localDate);
//农历部分文字展示优先顺序 替换的文字、农历节日、节气、公历节日、正常农历日期
String lunarString;
Expand Down Expand Up @@ -226,7 +228,7 @@ private void drawPoint(Canvas canvas, RectF rectF, LocalDate date, Drawable draw

//绘制节假日
private void drawHolidayWorkday(Canvas canvas, RectF rectF, LocalDate localDate, Drawable holidayDrawable, Drawable workdayDrawable, int holidayTextColor, int workdayTextColor, int alphaColor) {
if (mAttrs.isShowHoliday) {
if (mAttrs.showHoliday) {
int[] holidayLocation = getHolidayLocation(rectF.centerX(), rectF.centerY());
if (mHolidayList.contains(localDate)) {
if (holidayDrawable == null) {
Expand Down
Loading

0 comments on commit e6e8b08

Please sign in to comment.