1010[ 查看更新日志] ( https://github.com/gzu-liyujiang/AndroidPicker/blob/master/ChangeLog.md ) ,新版本可能未对旧版API作兼容处理,升级后若编译报错请根据错误提示更改。
1111
1212# Install
13- “app”是测试用例;“library”包括WheelPicker、ColorPicker、FilePicker,
13+ “app”是测试用例;“library”包括WheelPicker、ColorPicker、FilePicker、MultiplePicker ,
1414WheelPicker包括DatePicker、TimePicker、OptionPicker、LinkagePicker、AddressPicker、NumberPicker、DoublePicker等。
15- #### ~~ 懒人建议直接远程加载jcenter里的~~
15+ #### 懒人建议直接远程加载jcenter里的
1616WheelPicker、FilePicker及ColorPicker是独立的,需要用哪个就compile哪个。
1717latest.release表示使用最新版,也可以[ 参照此处指定具体的版本号] ( https://github.com/gzu-liyujiang/AndroidPicker/releases ) ,~~ 1.3.x之前的版本基于ScrollView,1.4.x版本基于ListView~~ ,1.5.x之后的版本基于View:
1818``` groovy
1919dependencies {
20- compile 'cn.qqtheme.framework:WheelPicker:版本号'
21- compile 'cn.qqtheme.framework:FilePicker:版本号 '
22- compile 'cn.qqtheme.framework:ColorPicker:版本号'
23- }
24- ```
25- 如果出现“All com.android.support libraries must use the exact same version specification”这种错误,请将依赖改为:
26- ```
27- compile('cn.qqtheme.framework:WheelPicker:版本号') {
28- exclude group: 'com.android.support'
20+ compile( 'cn.qqtheme.framework:WheelPicker:版本号') {
21+ exclude group: 'com.android.support '
22+ }
23+ compile('cn.qqtheme.framework:FilePicker:版本号') {
24+ exclude group: 'com.android.support'
25+ }
26+ compile('cn.qqtheme.framework:ColorPicker:版本号') {
27+ exclude group: 'com.android.support'
28+ }
2929}
3030```
3131#### 若jcenter仓库里的无法下载的话,可换[ JitPack] ( https://jitpack.io/#gzu-liyujiang/AndroidPicker ) 的仓库试试:
@@ -40,9 +40,15 @@ repositories {
4040第二步,在项目的app模块下的build.gradle里加:
4141```
4242dependencies {
43- compile 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:版本号'
44- compile 'com.github.gzu-liyujiang.AndroidPicker:FilePicker:版本号'
45- compile 'com.github.gzu-liyujiang.AndroidPicker:ColorPicker:版本号'
43+ compile('com.github.gzu-liyujiang.AndroidPicker:WheelPicker:版本号') {
44+ exclude group: 'com.android.support'
45+ }
46+ compile('com.github.gzu-liyujiang.AndroidPicker:FilePicker:版本号') {
47+ exclude group: 'com.android.support'
48+ }
49+ compile('com.github.gzu-liyujiang.AndroidPicker:ColorPicker:版本号') {
50+ exclude group: 'com.android.support'
51+ }
4652}
4753```
4854#### 使用Eclipse的话如何集成?
@@ -61,12 +67,33 @@ dependencies {
6167各种设置方法:
6268``` java
6369picker. setXXX(... );
64- ```
65- 自定义顶部及底部视图:
70+ ```
71+ 如:
72+ 设置选项偏移量,可用来要设置显示的条目数,范围为1-5,1显示3行、2显示5行、3显示7行……
73+ ``` java
74+ picker. setOffset(... );
75+ ```
76+ 设置是否禁用循环
77+ ``` java
78+ picker. setCycleDisable(... );
79+ ```
80+ 设置每项的高度,范围为2-4
81+ ``` java
82+ picker. setLineSpaceMultiplier(... );
83+ ```
84+ 设置文字颜色
85+ ``` java
86+ picker. setTextColor(... );
87+ ```
88+ 设置分隔线配置项,设置null将隐藏分割线及阴影
89+ ``` java
90+ picker. setDividerConfig(... );
91+ ```
92+ 自定义顶部及底部视图
6693``` java
6794picker. setHeaderView(... );
6895picker. setFooterView(... );
69- ```
96+ ```
7097自定义选择器示例:
7198``` java
7299 CustomHeaderAndFooterPicker picker = new CustomHeaderAndFooterPicker (this );
@@ -81,6 +108,7 @@ picker.setFooterView(...);
81108<font color =" #FF0000 " >核心滚轮控件为WheelView,可以参照SinglePicker、DateTimePicker及LinkagePicker自行扩展。</font >
82109
83110# Screenshots
111+ 以下图片显示的效果可能已修改过,实际效果请运行demo查看。
84112![ 滑轮选择器内嵌效果图] ( /screenshots/nestwheelview.jpg )
85113![ 自定义选择器效果图] ( /screenshots/custom.gif )
86114![ 日期选择器效果图] ( /screenshots/date.gif )
0 commit comments