</com.haibin.calendarview.CalendarLayout>
CalendarLayout api
public void expand(); //展开
public void shrink(); //收缩
public boolean isExpand();//是否已经展开
CalendarView
真正的日历类,可以自行通过attr配置
<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:max_year=“2020”
app:other_month_text_color=“#e1e1e1”
app:other_month_lunar_text_color=“#e1e1e1”
app:scheme_text=“假”
app:scheme_text_color=“#333”
app:scheme_theme_color=“#128c4b”
app:selected_lunar_text_color=“#CFCFCF”
app:month_view=“com.haibin.calendarviewproject.meizu.MeiZuMonthView”
app:week_view=“com.haibin.calendarviewproject.meizu.MeizuWeekView”
app:selected_text_color=“#333”
app:selected_theme_color=“#108cd4”
app:week_background=“#fff”
app:week_text_color=“#111”
app:year_view_day_text_color=“#333333”
app:year_view_day_text_size=“9sp”
app:year_view_month_text_color=“#ff0000”
app:year_view_month_text_size=“20sp”
app:year_view_scheme_color=“#f17706”/>
完整attr
CalendarView api
public int getCurDay(); //今天
public int getCurMonth(); //当前的月份
public int getCurYear(); //今年
public void showSelectLayout(final int year); //快速弹出年份选择月份
public void closeSelectLayout(final int position); //关闭选择年份并跳转日期
/**
- 设置日期范围
- @param minYear 最小年份
- @param minYearMonth 最小年份对应月份
- @param maxYear 最大月份
- @param maxYearMonth 最大月份对应月份
*/
public void setRange(int minYear, int minYearM