# CalendarView **Repository Path**: ysphello0/CalendarView ## Basic Information - **Project Name**: CalendarView - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-29 - **Last Updated**: 2024-05-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CalendarView # 一个自带农历和节假日的开源日历库 这是一个自带节假日和滑动的日历控件,欢迎各位拍砖 ## 效果图
![](https://github.com/nanchen2251/CalendarView/blob/master/GIF.gif) #### ⊙开源不易,希望给个star或者fork奖励 ## 特点 1、支持ViewPager形式的左右滑动
2、支持点击效果
3、支持农历和周末的颜色显示
## 使用方法 #### 1、添加依赖
```java compile 'com.nanchen.calendarview:calendarview:1.0.7' ``` 或者
```java com.nanchen.calendarview calendarview 1.0.7 pom ``` #### 2017年1月5日后仓库迁移移到jitpack,添加依赖方式为: ##### Step 1. Add it in your root build.gradle at the end of repositories: ```java allprojects { repositories { ... maven { url 'https://jitpack.io' } } } ``` ##### Step 2. Add the dependency ```java dependencies { compile 'com.github.nanchen2251:CalendarView:1.0.7' } ``` #### 2、在xml文件里面使用
```java ``` #### 3、在Activity里面使用
```java  MyCalendarView calendarView = (MyCalendarView) window.findViewById(R.id.calendarView); calendarView.setClickDataListener(new ClickDataListener() { @Override public void clickData(int year, int month, int day) { date = String.format(Locale.CHINA, "%04d-%02d-%02d", year, month, day); Toast.showToast(MainActivity.this.getApplicationContext(),date,Toast.LENGTH_SHORT).show(); } }); ``` ## 关于作者    南尘
   四川成都
   [博客园](http://www.cnblogs.com/liushilin/)