FlexibleCalendar-master

所属分类:FlashMX/Flex源码
开发工具:Java
文件大小:1610KB
下载次数:1
上传日期:2016-08-23 15:05:22
上 传 者半盏流年
说明:  FlexibleCalendar-master,源码精简,亲测可用,适合初学者研究
(FlexibleCalendar-master, the source code to streamline, pro-test available for beginners research)

文件列表:
.idea (0, 2015-08-16)
.idea\.name (16, 2015-08-16)
.idea\compiler.xml (686, 2015-08-16)
.idea\copyright (0, 2015-08-16)
.idea\copyright\profiles_settings.xml (74, 2015-08-16)
.idea\gradle.xml (739, 2015-08-16)
.idea\misc.xml (2226, 2015-08-16)
.idea\modules.xml (482, 2015-08-16)
.idea\runConfigurations.xml (564, 2015-08-16)
.idea\vcs.xml (164, 2015-08-16)
FlexibleCalendar.iml (947, 2015-08-16)
LICENSE (1071, 2015-08-16)
app (0, 2015-08-16)
app\app.iml (7387, 2015-08-16)
app\build.gradle (569, 2015-08-16)
app\proguard-rules.pro (676, 2015-08-16)
app\src (0, 2015-08-16)
app\src\androidTest (0, 2015-08-16)
app\src\androidTest\java (0, 2015-08-16)
app\src\androidTest\java\com (0, 2015-08-16)
app\src\androidTest\java\com\p_v (0, 2015-08-16)
app\src\androidTest\java\com\p_v\flexiblecalendarexample (0, 2015-08-16)
app\src\androidTest\java\com\p_v\flexiblecalendarexample\ApplicationTest.java (362, 2015-08-16)
app\src\main (0, 2015-08-16)
app\src\main\AndroidManifest.xml (1261, 2015-08-16)
app\src\main\java (0, 2015-08-16)
app\src\main\java\com (0, 2015-08-16)
app\src\main\java\com\p_v (0, 2015-08-16)
app\src\main\java\com\p_v\flexiblecalendarexample (0, 2015-08-16)
app\src\main\java\com\p_v\flexiblecalendarexample\CalendarActivity.java (676, 2015-08-16)
app\src\main\java\com\p_v\flexiblecalendarexample\CalendarActivity2.java (3675, 2015-08-16)
app\src\main\java\com\p_v\flexiblecalendarexample\CalendarActivity3.java (3545, 2015-08-16)
app\src\main\java\com\p_v\flexiblecalendarexample\CalendarActivity4.java (4952, 2015-08-16)
app\src\main\java\com\p_v\flexiblecalendarexample\CalendarActivityFragment.java (9334, 2015-08-16)
app\src\main\java\com\p_v\flexiblecalendarexample\CalendarListActivity.java (2891, 2015-08-16)
app\src\main\java\com\p_v\flexiblecalendarexample\CalendarListAdapter.java (1987, 2015-08-16)
... ...

# FlexibleCalendar A customizable calendar for android. Now, customize your calendar your way. ![Demo](demo/demo.gif) **Gradle** Add dependencies in `build.gradle`, ```groovy dependencies { compile 'com.p_v:flexiblecalendar:0.1.1' } ``` Customize FlexibleCalendar using the ICalendarView interface ```java calendarView.setCalendarView(new FlexibleCalendarView.ICalendarView() { @Override public BaseCellView getCellView(int position, View convertView, ViewGroup parent) { //customize the date cells BaseCellView cellView = (BaseCellView) convertView; if (cellView == null) { LayoutInflater inflater = LayoutInflater.from(CalendarActivity4.this); cellView = (BaseCellView) inflater.inflate(R.layout.calendar3_date_cell_view, null); } return cellView; } @Override public BaseCellView getWeekdayCellView(int position, View convertView, ViewGroup parent) { //customize the weekday header cells BaseCellView cellView = (BaseCellView) convertView; if (cellView == null) { LayoutInflater inflater = LayoutInflater.from(CalendarActivity4.this); cellView = (BaseCellView) inflater.inflate(R.layout.calendar3_week_cell_view, null); cellView.setBackgroundColor(getResources().getColor(android.R.color.holo_purple)); cellView.setTextColor(getResources().getColor(android.R.color.holo_orange_light)); cellView.setTextSize(18); } return cellView; } @Override public String getDayOfWeekDisplayValue(int dayOfWeek, String defaultValue) { return String.valueOf(defaultValue.charAt(0)); } }); ``` Display events for a day using the EventDataProvider ```java calendarView.setEventDataProvider(new FlexibleCalendarView.EventDataProvider() { @Override public List getEventsForTheDay(int year, int month, int day) { return getEventColorList(year,month,day); } }); ``` Track the month change event by setting the OnMonthChangeListener ```java calendarView.setOnMonthChangeListener(new FlexibleCalendarView.OnMonthChangeListener() { @Override public void onMonthChange(int year, int month, int direction) { //do things on month change } }); ``` Display circular events in different colors and sizes. ![Events](demo/screenshot-1.jpg) Choose whether to show dates outside month or not by setting the `showDatesOutsideMonth` flag, using `FlexibleCalendarView#showDatesOutsideMonth()` method. ![Outside Month](demo/screenshot-2.jpg)   ![Without Outside Month](demo/screenshot-3.jpg) Navigate the calendar: `goToCurrentMonth` - Go the the current month
`moveToNextDate` - Select the date after the current selection
`moveToPreviousDate` - Select the date before the current selection
`moveToNextMonth` - Move the view to the next month from the current visible month
`moveToPreviousMonth` - Move the view to the previous month from the current visible month
Customizable display cells with different states: `state_date_regular` - Regular date
`state_date_today` - Today's date
`state_date_selected` - Selected date
`state_date_outside_month` - Date lying outside month but in current month view
Sample cell background: ```xml ```

近期下载者

相关文件


收藏者