AndroidPicker

安卓选择器类库,包括日期及时间选择器(可用于出生日期、营业时间等)、单项选择器(可用于性别、民族、职业、学历、星座等)、二三级联动选择器(可用于车牌号、基金定投日期等)、城市地址选择器(分省级、地市级及区县级)、数字选择器(可用于年龄、身高、体重、温度等)、日历选日期择器(可用于酒店及机票预定日期)、颜色选择器、文件及目录选择器等……WheelPicker/DatePicker/TimePicker/OptionPicker/NumberPicker/LinkagePicker/AddressPicker/CarNumberPicker/CalendarPicker/ColorPicker/FilePicker etc

欢迎大伙儿在Issues提交你的意见或建议。欢迎 Fork & Pull requests 贡献您的代码,大家共同学习【AndroidPicker 交流群 604235437】。

依赖配置

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

所有选择器的基础窗体:

dependencies {implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:<version>'
}

滚轮选择器的滚轮控件:

dependencies {implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelView:<version>'
}

单项/数字、二三级联动、日期/时间等滚轮选择器:

dependencies {implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:<version>'implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelView:<version>'implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:<version>'
}

省市区地址选择器:

dependencies {implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:<version>'implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelView:<version>'implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:<version>'implementation 'com.github.gzu-liyujiang.AndroidPicker:AddressPicker:<version>'
}

文件/目录选择器:

dependencies {implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:<version>'implementation 'com.github.gzu-liyujiang.AndroidPicker:FilePicker:<version>'
}

颜色选择器:

dependencies {implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:<version>'implementation 'com.github.gzu-liyujiang.AndroidPicker:ColorPicker:<version>'
}

日历日期选择器:

dependencies {implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:<version>'implementation 'com.github.gzu-liyujiang.AndroidPicker:CalendarPicker:<version>'
}

旧版本 Support 稳定版本

dependencies {implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:1.5.6.20181018'implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:1.5.6.20181018'implementation 'com.github.gzu-liyujiang.AndroidPicker:FilePicker:1.5.6.20181018'implementation 'com.github.gzu-liyujiang.AndroidPicker:ColorPicker:1.5.6.20181018'
}

旧版本 AndroidX 稳定版本

dependencies {implementation 'com.github.gzu-liyujiang.AndroidPicker:Common:2.0.0'implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:2.0.0'implementation 'com.github.gzu-liyujiang.AndroidPicker:FilePicker:2.0.0'implementation 'com.github.gzu-liyujiang.AndroidPicker:ColorPicker:2.0.0'
}

代码同时托管在GitHubGitEE,因此3.x及以上版本的依赖项也可以将com.github.gzu-liyujiang换成com.gitee.li_yu_jiang,即:

    implementation 'com.gitee.li_yu_jiang.AndroidPicker:Common:<version>'implementation 'com.gitee.li_yu_jiang.AndroidPicker:WheelView:<version>'implementation 'com.gitee.li_yu_jiang.AndroidPicker:WheelPicker:<version>'implementation 'com.gitee.li_yu_jiang.AndroidPicker:AddressPicker:<version>'implementation 'com.gitee.li_yu_jiang.AndroidPicker:ColorPicker:<version>'implementation 'com.gitee.li_yu_jiang.AndroidPicker:FilePicker:<version>'implementation 'com.gitee.li_yu_jiang.AndroidPicker:CalendarPicker:<version>'

混淆规则

项目库混淆无需额外配置。

用法示例

常见用法请参阅 demo,高级用法请细读源码。强烈建议拉取代码运行,尝试修改 demo 对比查看实际效果以便加深理解。

在 Java 中

        OptionPicker picker = new OptionPicker(this);picker.setBackgroundColor(true, 0xFFFFFFFF);picker.setData("测试", "很长很长很长很长很长很长很长很长很长很长很长很长很长很长");picker.setOnOptionPickedListener(this);picker.getTitleView().setText("这是标题");picker.getWheelView().setCyclicEnabled(true);picker.getWheelView().setCurvedEnabled(true);picker.getWheelView().setCurvedMaxAngle(60);picker.show();
        AddressPicker picker = new AddressPicker(this);picker.setAddressMode(AddressMode.PROVINCE_CITY_COUNTY);picker.setDefaultValue("贵州省", "贵阳市", "观山湖区");picker.setOnAddressPickedListener(this);picker.show();

在 XML 中

        <LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="vertical"><com.github.gzuliyujiang.wheelpicker.widget.OptionWheelLayoutandroid:id="@+id/wheel_option"android:layout_width="90dp"android:layout_height="150dp"android:layout_gravity="center_horizontal"app:wheel_itemTextAlign="center" /><com.github.gzuliyujiang.wheelpicker.widget.LinkageWheelLayoutandroid:id="@+id/wheel_linkage"android:layout_width="match_parent"android:layout_height="150dp"app:wheel_curtainColor="#FFF1F1F1"app:wheel_curtainEnabled="true"app:wheel_indicatorEnabled="false" /><com.github.gzuliyujiang.wheelpicker.widget.NumberWheelLayoutandroid:layout_width="90dp"android:layout_height="150dp"android:layout_gravity="center_horizontal"app:wheel_curvedEnabled="true"app:wheel_curvedMaxAngle="45"app:wheel_label="个"app:wheel_maxNumber="30"app:wheel_minNumber="10"app:wheel_stepNumber="5"app:wheel_visibleItemCount="7" /><com.github.gzuliyujiang.wheelpicker.widget.DatimeWheelLayoutandroid:layout_width="match_parent"android:layout_height="150dp"app:wheel_dateMode="year_month_day"app:wheel_indicatorColor="#FFEEEEEE"app:wheel_indicatorSize="5dp"app:wheel_timeMode="hour_12_no_second" /><com.github.gzuliyujiang.wheelpicker.widget.DateWheelLayoutandroid:layout_width="120dp"android:layout_height="150dp"android:layout_gravity="center_horizontal"app:wheel_dateMode="month_day"app:wheel_dayLabel="日"app:wheel_monthLabel="月" /><com.github.gzuliyujiang.wheelpicker.widget.TimeWheelLayoutandroid:layout_width="95dp"android:layout_height="150dp"android:layout_gravity="center_horizontal"app:wheel_curvedEnabled="true"app:wheel_curvedMaxAngle="45"app:wheel_hourLabel=":"app:wheel_minuteLabel=":"app:wheel_timeMode="hour_24_has_second" /></LinearLayout>

效果预览

以下图片显示的效果可能已修改过,实际效果请运行 demo 查看。








特别鸣谢

  • 基于 View 的 WheelView
  • 基于 ListView 的 WheelView
  • 基于 ScrollView 的 WheelView
  • SingleDateAndTimePicker
  • China_Province_City
  • AndroidColorPicker
  • calendar

许可协议

3.0.0 之后

Copyright (c) 2020-2021 gzu-liyujiang <1032694760@qq.com>The software is licensed under the Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
PURPOSE.
See the Mulan PSL v2 for more details.

3.0.0 之前

MIT LicenseCopyright (c) 穿青山魈人马<liyujiang_tk@yeah.net>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.

【AndroidPicker】停更两年,安卓选择器类库(WheelPicker、DatePicker、AddressPicker、ColorPicker、FilePicker)3.x全新版本重构来袭相关推荐

  1. android双日期选择器,AndroidPicker 安卓选择器类库,包括日期选择器、时间选择器、单项选择器、双项选择器、城市地址选择器、车牌号选择器 @codeKK Android开源站...

    安卓选择器类库,包括日期及时间选择器(可设置范围).单项选择器(可用于性别.职业.学历.星座等).城市地址选择器(分省级.地级及县级).数字选择器(可用于年龄.身高.体重.温度等).双项选择器.颜色选 ...

  2. vs安卓开发发布_【详细解析】手机系统两年就停更?其实安卓厂商也有苦衷......

    前言 之前推送安卓11正式版的时候,有很多人提到了魅族不更新底层,或者是更新的很慢.还有的品牌甚至旗舰机都只更新一年,第二年就停更了,所以今天就来详细说说,手机厂商为什么会这么做(而且还是顶着被骂的风 ...

  3. 4款良心电脑软件,有两款虽已停更,依然支持免费使用

    闲话少说,直奔主题 1.小丸工具箱(视频压缩神器) 这是一款视频压缩神器,它支持几乎所有格式的视频压缩,完全免费.无广告,虽已停更6年,仍被众多网友推荐,全凭极致体验与口碑. 小丸工具箱操作非常简单, ...

  4. miui android 更新更快,即日起,“史上最快的安卓系统”要停更了!或将迎来MIUI 10?...

    原标题:即日起,"史上最快的安卓系统"要停更了!或将迎来MIUI 10? 今日,小米官方宣布:MIUI 将在4月27日发布最后一个更新包MIUI 9开发版/体验版8.4.26之后大 ...

  5. Codeforces 刷题记录(已停更)

    Codeforces 每日刷题记录 (已停更) 打'+'是一些有启发意义的题目,部分附上一句话题解,每日更新3题,大部分题目较水. Day ID Problem Tutorial Note 1 1 + ...

  6. 被江苏网警点名后 咪蒙发道歉信:公众号停更2个月 微博永久关停

    在"寒门状元之死"文章刷屏被质疑造假后,"才华有限青年"团队作出了回应,但是显然回应的一切并不能说服围观者们,甚至引起网友们更大的愤怒,被指"毫无诚意 ...

  7. 爱奇艺回应遭做空;百度 App 部分频道停更;React Native 0.62 发布 | 极客头条

    整理 | 屠敏 头图 | CSDN 下载自东方 IC 「极客头条」-- 技术人员的新闻圈! CSDN 的读者朋友们早上好哇,「极客头条」来啦,快来看今天都有哪些值得我们技术人关注的重要新闻吧. 一分钟 ...

  8. 李子柒停更半年后,网红经济的“二元一次方程式”解开了吗?

    文|螳螂观察 作者| 青月 2021年7月14日,李子柒在发布了视频<柴米油盐酱醋茶完结篇>后,停更至今,已有半年有余. 从其后续的发声来看,此次停更是李佳佳(即"李子柒&quo ...

  9. 直击|咪蒙、才华有限青年注销 旗下公众号清空或停更

    相关新闻:直击|咪蒙公众号自主注销 此前微博已永久关停 新浪科技讯 2月21日下午消息,新浪科技发现霍尔果斯爆炸糖影视传媒有限公司旗下"咪蒙""才华有限青年"公 ...

最新文章

  1. 121. Best Time to Buy and Sell Stock
  2. Android Stability test occured SWT restart issue
  3. BUUCTF(pwn)护网杯_2018_gettingstart
  4. 用sql从文件中恢复数据库
  5. android意图传递参数返回结果(六)
  6. 8-[多线程] 进程池线程池
  7. android bench内存测试,华为p10内存测试软件(androbench) v5.0.1 免费版
  8. mybatis generator修改默认生成的sql模板
  9. 如何优化 App 的启动耗时?
  10. WPF中嵌套charts图表查询数据
  11. 企业如何进行数据质量评估
  12. STL源码剖析(三)
  13. re.findall的正则参数为什么不能包含元组表达式()或竖线符号,先挖个坑
  14. 网络编程之OSI七层协议
  15. 标签制作软件如何制作圆形标签中的弧形文字
  16. Win10使用命令行查看cpu的温度
  17. CUDA: Occupancy(占用率)详解
  18. OneNote用完画笔怎么从绘图模式回到打字模式
  19. 每日一句_《定风波·暮春漫兴》
  20. 直播能为教育机构做些什么?授课和招生是必备的

热门文章

  1. 浅谈如何做好软件研发团队的盘点
  2. threejs中PC与手机操作的一些总结
  3. win10和win11之间的数据共享
  4. ERP 软件项目验收流程
  5. 空气测试仪“清心”(2)-整体架构
  6. 经典书籍《On Java》
  7. 迪丽热巴终于剪对了刘海!这么选刘海你的发型还有的救
  8. 盘古分词 - 多元分词算法
  9. 罗技g903和g502无线版对比评测
  10. Rust语言教程(3) - 数组与向量