# ExpandableCalendar **Repository Path**: cocobaby/ExpandableCalendar ## Basic Information - **Project Name**: ExpandableCalendar - **Description**: 可展开收起的日历,主要处理一些问题,比如calendar的使用,gridview的使用,gridview在listview中的滚动冲突解决。 - **Primary Language**: Android - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 101 - **Forks**: 39 - **Created**: 2014-12-23 - **Last Updated**: 2025-03-27 ## Categories & Tags **Categories**: android-modules **Tags**: None ## README ## deprecated ## 使用[CalendarPageView](https://github.com/Kyson/CalendarPageView)替代! > 此项目从 **TT日程管理** 剥离出来,欢迎fork,star。 ### [开源项目地址](http://git.oschina.net/cocobaby/ExpandableCalendar) ### [TT日程管理应用下载](http://openbox.mobilem.360.cn/index/d/sid/2423472) 主要处理一些问题,比如calendar的使用,gridview的使用,gridview在listview中的滚动冲突解决。 项目的结构良好,代码注释也比较多。 > Github上有一个月视图的日历控件,可以根据自己的要求定义日历 **[CalendarPageView](https://github.com/Kyson/CalendarPageView)** ## 项目演示: ![项目演示](http://git.oschina.net/cocobaby/ExpandableCalendar/raw/master/ART/ex_cal_showcase.gif) ## 使用说明: ### step1 把ExpandableCalendar作为library引用到你的项目 ### step2 项目核心控件为`CalendarCard`,你可以自定义它的样式,通过如下属性 ```xml calendar:daySelector="@drawable/tl_widget_calendar_item_light_selector" calendar:dayTextStyle="@style/textView_calendar_common_day_normal" calendar:notCurrentTextStyle="@style/textView_sp12_grey_bright" calendar:todayTextStyle="@style/textView_calendar_common_today" calendar:weekTextStyle="@style/textView_sp13_primary_text_bold" ``` 需要注意的是,`CalendarCard`并没有包含演示中的**回到今天**,**前进或后退一个月**及**显示月份**的头部视图 *你可以查看`CommonCalendarView`来了解使用方法。* ### step3 `CommonCalendarView`类是我定义的一个日历,它是`CalendarCard`的使用demo,当然,如果你喜欢这个样式,你也可以直接使用(像普通控件一样) ## API - `mCalendarCard.toBeforeMonth();` - `mCalendarCard.toAfterMonth();` - `mCalendarCard.selectCurrentCalendar(Calendar.getInstance());` - `mCalendarCard.getSelectedDate()` - `mCalendarCard.setOnCalendarChangeListener(new OnCalendarChangeListener());` - `mCalendarCard.setOnDaySelectListener(new OnDaySelectListener());` ## 鸣谢 [NineOldAndroids](http://nineoldandroids.com/]) ## 更多 - [我的个人博客](http://www.hikyson.cn) - [我的开源项目](http://git.oschina.net/cocobaby) - [我的新浪微博](http://weibo.com/1980495343/profile?rightmod=1&wvr=6&mod=personinfo) ##License Copyright (c) 2014 Kyson Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)