Skip to content

Commit

Permalink
release as 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chaunqingren committed May 13, 2017
1 parent cb3dab7 commit 6f6ca1a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### v1.5.2 - 2017.05.14
有童鞋反应动画太慢,移除选择器默认的动画;
DoublePicker支持设置前缀及后缀标签;
修复联动选择器不滑动(使用默认项)就确定时的奔溃问题;
修复setXXRangeStart()及setXXRangeEnd()二者调用顺序颠倒出现的问题;
### v1.5.1 - 2017.05.03
日期时间选择器支持设置各项平分布局;
顶部按钮文字颜色默认调整为青蓝风格;
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ dependencies {
compile project(':library:WheelPicker')
compile project(':library:FilePicker')
compile project(':library:ColorPicker')
// compile files('libs/AndroidPicker-1.5.1.jar')
// compile files('libs/AndroidPicker-1.5.2.jar')
// compile 'cn.qqtheme.framework:WheelPicker:latest.release'
// compile 'cn.qqtheme.framework:FilePicker:latest.release'
// compile 'cn.qqtheme.framework:ColorPicker:latest.release'
// compile 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:1.5.1'
// compile 'com.github.gzu-liyujiang.AndroidPicker:FilePicker:1.5.1'
// compile 'com.github.gzu-liyujiang.AndroidPicker:ColorPicker:1.5.1'
// compile 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:1.5.2'
// compile 'com.github.gzu-liyujiang.AndroidPicker:FilePicker:1.5.2'
// compile 'com.github.gzu-liyujiang.AndroidPicker:ColorPicker:1.5.2'
}
14 changes: 11 additions & 3 deletions app/src/main/java/cn/qqtheme/androidpicker/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;
Expand Down Expand Up @@ -105,8 +107,8 @@ public void onYearMonthDayPicker(View view) {
picker.setCanceledOnTouchOutside(true);
picker.setUseWeight(true);
picker.setTopPadding(ConvertUtils.toPx(this, 20));
picker.setRangeStart(2016, 8, 29);
picker.setRangeEnd(2111, 1, 11);
picker.setRangeStart(2016, 8, 29);
picker.setSelectedItem(2050, 10, 14);
picker.setOnDatePickListener(new DatePicker.OnYearMonthDayPickListener() {
@Override
Expand Down Expand Up @@ -230,9 +232,11 @@ public void onDoublePicker(View view) {
secondData.add("私家小汽车");
secondData.add("公共交通汽车");
final DoublePicker picker = new DoublePicker(this, firstData, secondData);
picker.setDividerVisible(false);
picker.setShadowColor(Color.DKGRAY, 80);
picker.setDividerVisible(true);
picker.setCycleDisable(false);
picker.setSelectedIndex(2, 1);
picker.setFirstLabel("于", null);
picker.setSecondLabel("骑/乘", "出发");
picker.setOnPickListener(new DoublePicker.OnPickListener() {
@Override
public void onPicked(int selectedFirstIndex, int selectedSecondIndex) {
Expand All @@ -243,13 +247,15 @@ public void onPicked(int selectedFirstIndex, int selectedSecondIndex) {
}

public void onLinkagePicker(View view) {
//联动选择器的更多用法,可参见AddressPicker和CarNumberPicker
LinkagePicker.DataProvider provider = new LinkagePicker.DataProvider() {

@Override
public boolean isOnlyTwo() {
return true;
}

@NonNull
@Override
public List<String> provideFirstData() {
ArrayList<String> firstList = new ArrayList<>();
Expand All @@ -258,6 +264,7 @@ public List<String> provideFirstData() {
return firstList;
}

@NonNull
@Override
public List<String> provideSecondData(int firstIndex) {
ArrayList<String> secondList = new ArrayList<>();
Expand All @@ -273,6 +280,7 @@ public List<String> provideSecondData(int firstIndex) {
return secondList;
}

@Nullable
@Override
public List<String> provideThirdData(int firstIndex, int secondIndex) {
return null;
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ com.android.build.gradle.overridePathCheck=true
#android.useDeprecatedNdk=true

#下面定义一些常量供gradle脚本使用
VERSION_NAME=1.5.1
VERSION_CODE=151
VERSION_NAME=1.5.2
VERSION_CODE=152
COMPILE_SDK_VERSION=23
MIN_SDK_VERSION=14
#安卓6.0开始(API23+),需要动态申请权限
Expand Down

0 comments on commit 6f6ca1a

Please sign in to comment.