lfwy / DateTimePicker

:star::tada:一个高颜值日期时间选择器;极简API,内置弹窗,可动态配置样式及主题,选择器支持完全自定义UI。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


API

Language

中文 | English

DateTimePicker 一个简约、漂亮的日期时间选择器,支持全方位自定义UI,内置日期时间选择弹窗,基于 Google BottomSheetDialog,可直接使用。

预览

加载不出图片可以前往 简书掘金 查看

快速体验


或者 点击下载

如何引入

Step 1. 添加 JitPack repository

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Step 2. 添加 Gradle依赖

dependencies {
    ...
    implementation 'com.google.android.material:material:1.1.0' //为了防止不必要的依赖冲突,0.0.3开始需要自行依赖google material库
    implementation 'com.github.loperSeven:DateTimePicker:0.3.3'//具体版本请看顶部jitpack标识,如0.3.3,仅支持androidx
}


如何使用

日期时间选择控件
  DateTimePicker 使用说明
卡片弹窗
  CardDatePickerDialog 使用说明
自定义选择器
  DateTimePicker 自定义

更新日志

  • 新增DateTimeController逻辑控制器,以支持UI 100% 自定义
  • 重构DateTimePicker,抽离逻辑至DateTimeController,自身仅控制UI
  • 抽离常量至DateTimeConfig
  • 抽离像素单位转换至ContextExt拓展
  • fix issues 4-CardDatePickerDialog.Builder内变量添加@JvmField以支持Java调用
  • 修复设置最大年份后,当选择到最大年份时,月份为0的问题
  • 修复范围最大值,范围最小值,选中默认值之间冲突时约束异常问题(规则为:最大范围值与最小范围值存在冲突时,后设置的值不会生效;选中默认值与范围最大值/范围最小值存在冲突时,不会生效)
  • 优化监听回调代码,使用kotlin特性,使回调更加简洁

    eg:感谢 yaolv7 提供的Pull requests
  • DateTimePicker类变更为kotlin编写
  • 新增单位标签可在代码内配置
  • 移除DateTimePicker回调监听非必要字段
  • 新增CardDatePickerDialog取消、确定按钮文字配置
  • 新增CardDatePickerDialog取消按钮回调监听
  • 变更CardDatePickerDialog监听绑定至builder内

    eg:此次更新对原有方法及配置有一定改动,详情查看 [ 如何使用 ]

混淆

-dontwarn com.loper7.date_time_picker.**
-keep class com.loper7.date_time_picker.**{*;}

感谢

Number Picker

联系我

Issues:Issues
邮箱:loper7@163.com

Licenses

Copyright 2020 loperSeven

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

:star::tada:一个高颜值日期时间选择器;极简API,内置弹窗,可动态配置样式及主题,选择器支持完全自定义UI。


Languages

Language:Kotlin 100.0%