一款遵循 Material Design 风格的 Android 日历
gradle:
compile 'com.github.BlackBoxVision:material-calendar-view:v1.5.7'
<io.blackbox_vision.materialcalendarview.view.CalendarView android:id="@+id/calendar_view" android:layout_width="match_parent" android:layout_height="match_parent" app:calendarIsMultiSelectDayEnabled="false" app:calendarIsOverflowDatesVisible="true" app:calendarBackgroundColor="@color/colorPrimary" app:calendarTitleTextColor="@color/colorAccent" app:calendarCurrentDayTextColor="@color/white" app:calendarDayOfWeekTextColor="@android:color/white" app:calendarDisabledDayBackgroundColor="@color/colorPrimary" app:calendarDisabledDayTextColor="@android:color/darker_gray" app:calendarSelectedDayBackgroundColor="@color/colorAccent" app:calendarTitleBackgroundColor="@color/colorPrimary" app:calendarWeekBackgroundColor="@color/colorPrimary" app:calendarCurrentDayBackgroundColor="@color/teal500" app:calendarWeekendTextColor="@color/colorAccent" app:calendarButtonBackgroundColor="@color/colorAccent" app:calendarWeekendDays="saturday|sunday"> </io.blackbox_vision.materialcalendarview.view.CalendarView> java: calendarView = (CalendarView) findViewById(R.id.calendar_view); calendarView.shouldAnimateOnEnter(true) .setFirstDayOfWeek(Calendar.MONDAY) .setOnDateClickListener(this::onDateClick) .setOnMonthChangeListener(this::onMonthChange) .setOnDateLongClickListener(this::onDateLongClick) .setOnMonthTitleClickListener(this::onMonthTitleClick); if (calendarView.isMultiSelectDayEnabled()) { calendarView.setOnMultipleDaySelectedListener(this::onMultipleDaySelected); } calendarView.[update](Calendar.getInstance(Locale.getDefault())); GitHub地址:https://github.com/BlackBoxVision/material-calendar-view
尊敬的会员,只需要简单地分享到微信、QQ空间、微薄等,就可以轻松地获得获得下载积分免费下载、发布任务啦,详细见推广规则。