File tree Expand file tree Collapse file tree
src/main/java/com/bigkoo/pickerview/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,6 @@ android {
2222dependencies {
2323 compile fileTree(dir : ' libs' , include : [' *.jar' ])
2424 compile project(' :pickerview' )
25- // compile 'com.bigkoo:pickerview:2.0.4 '
25+ // compile 'com.bigkoo:pickerview:2.0.5 '
2626 compile ' com.android.support:appcompat-v7:23.1.0'
2727}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22apply plugin : ' com.github.dcendents.android-maven'
33apply plugin : ' com.jfrog.bintray'
44
5- version = " 2.0.4 "
5+ version = " 2.0.5 "
66
77android {
88 compileSdkVersion 21
Original file line number Diff line number Diff line change @@ -42,6 +42,10 @@ public final void run() {
4242 if (loopView .totalScrollY - itemHeight *0.3 < top ){
4343 top = loopView .totalScrollY + i ;
4444 }
45+ else if (loopView .totalScrollY + itemHeight *0.3 > bottom ){
46+ bottom = loopView .totalScrollY + i ;
47+ }
48+
4549 if (loopView .totalScrollY <= top ){
4650 a = 40F ;
4751 loopView .totalScrollY = (int )top ;
Original file line number Diff line number Diff line change @@ -504,13 +504,13 @@ public boolean onTouchEvent(MotionEvent event) {
504504 // 边界处理。
505505 if (!isLoop ) {
506506 float top = -initPosition * itemHeight ;
507-
507+ float bottom = ( adapter . getItemsCount () - 1 - initPosition ) * itemHeight ;
508508 if (totalScrollY - itemHeight *0.3 < top ){
509509 top = totalScrollY - dy ;
510510 }
511-
512-
513- float bottom = ( adapter . getItemsCount () - 1 - initPosition ) * itemHeight ;
511+ else if ( totalScrollY + itemHeight * 0.3 > bottom ){
512+ bottom = totalScrollY - dy ;
513+ }
514514
515515 if (totalScrollY < top ) {
516516 totalScrollY = (int ) top ;
You can’t perform that action at this time.
0 commit comments