Git Product home page Git Product logo

signcalender's Introduction

SignCalender

项目中用到的一个签到日历自定义控件,基于网络源码的部分修改而成,满足自己项目的需求了。

  • 这个项目是为了练习发布依赖库;
  • 源码作者朋友如果看到后觉得不合适联系本人删掉本项目;

效果图

不带任和背景修饰

然后可以用以下代码设置背景的显示

DatePicker2 picker = (DatePicker2) findViewById(R.id.控件id);
picker.setFestivalDisplay(true); //是否显示节日
picker.setHolidayDisplay(true); //是否显示假期
picker.setDeferredDisplay(true); //是否显示补休

  • 上面的背景可以根据控件对象修改。

    源码提供了左上,上,右上,左,右和背景的标识物设置。

传入的日期集合格式支持以下两种,更多格式可到类里面补充修改为自己需要的

 List<String> tmp = new ArrayList<>();
 tmp.add("2016-7-2");
 tmp.add("2016-7-4");
 tmp.add("2016-07-21");
 tmp.add("2016-07-15");
 DPCManager.getInstance().setDecorBG(tmp);
  • 更多完整的内容可以看DEMO

怎么使用

  • 1.项目的build.gradle加入以下代码:
 allprojects {
	 repositories {
		...
		maven { url "https://jitpack.io" }
	 }
 }
  • 2.然后在module的build.gradle加入依赖:
 dependencies {
		...
		compile 'com.github.paradoxie:SignCalender:0.1'

 }

signcalender's People

Contributors

paradoxie avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.