Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henry-newbie/CalendarView
CalendarListview是一个高度定制的日期选择器,可以满足多选日期的需求
https://github.com/henry-newbie/CalendarView
Last synced: 2 months ago
JSON representation
CalendarListview是一个高度定制的日期选择器,可以满足多选日期的需求
- Host: GitHub
- URL: https://github.com/henry-newbie/CalendarView
- Owner: henry-newbie
- License: apache-2.0
- Created: 2016-06-27T06:09:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T05:27:14.000Z (almost 8 years ago)
- Last Synced: 2024-08-02T01:20:03.682Z (6 months ago)
- Language: Java
- Homepage:
- Size: 668 KB
- Stars: 386
- Watchers: 12
- Forks: 61
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-android-ui - CalendarView - 高度定制的日期选择器 (日历时间)
README
# CalendarView
================CalendarView是一个高度定制的日期选择器,可以满足多选日期的需求。
![CalendarView GIF](https://github.com/henry-newbie/CalendarView/blob/master/screenshot/calendar.gif)
### 集成
该库已上传到Jcenter中, 可以再build.gradle中直接添加dependencies {
compile 'com.henry:calendarview:1.1.2'
}
### 使用
在xml文件中声明DayPickerView
然后在你的代码中设置DataModel(参数集),DatePickerController(回调接口)
DayPickerView.DataModel dataModel = new DayPickerView.DataModel();
dataModel.yearStart = 2016;
dataModel.monthStart = 6;
dataModel.monthCount = 16;
dataModel.defTag = "¥100";
dataModel.leastDaysNum = 2;
dataModel.mostDaysNum = 100;dayPickerView.setParameter(dataModel, new DatePickerController() {
@Override
public void onDayOfMonthSelected(SimpleMonthAdapter.CalendarDay calendarDay) {
Toast.makeText(context, "onDayOfMonthSelected", Toast.LENGTH_SHORT).show();
}@Override
public void onDateRangeSelected(List selectedDays) {
Toast.makeText(context, "onDateRangeSelected", Toast.LENGTH_SHORT).show();
}@Override
public void alertSelectedFail(FailEven even) {
Toast.makeText(context, "alertSelectedFail", Toast.LENGTH_SHORT).show();
}
});onDayOfMonthSelected(SimpleMonthAdapter.CalendarDay calendarDay); 点击日期回调函数
onDateRangeSelected(List selectedDays); 选择日期范围回调函数
alertSelectedFail(FailEven even); 异常回调函数
---
### 定制
### 联系我
有问题可以直接在issues中反馈,我会及时fix,欢迎start。
### 感谢
Thanks to [CalendarListview](https://github.com/traex/CalendarListview)。