XML用法
如果需要在日历控件下方使用其它控件,使用CalendarLayout控件即可,calendar_content_view_id为其它控件的id,支持任意控件,如RecyclerView、ListView。CalendarView的calendar_card_view为任意自定义实现的日历绘制控件路径。
<com.haibin.calendarview.CalendarLayout
android:layout_width=“match_parent”
android:layout_height=“match_parent”
android:orientation=“vertical”
android:background="#fff"
app:calendar_content_view_id="@+id/linearView">
<com.haibin.calendarview.CalendarView
android:id="@+id/calendarView"
android:layout_width=“match_parent”
android:layout_height=“wrap_content”
android:background="#fff"
app:current_month_text_color="#333333"
app:current_month_lunar_text_color="#CFCFCF"
app:min_year=“2004”
app:other_month_text_color="#e1e1e1"
app:scheme_text_color="#333"
app:scheme_theme_color="#128c4b"
app:selected_lunar_text_color="#CFCFCF"
app:calendar_card_view=