Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setItemIndex error #6

Closed
recwert opened this issue Dec 31, 2015 · 6 comments
Closed

setItemIndex error #6

recwert opened this issue Dec 31, 2015 · 6 comments

Comments

@recwert
Copy link

recwert commented Dec 31, 2015

when i setItemIndex to the WheelHourPicker, the picker show the view error,
for example, when i set WheelHourPicker.setCurrentHour(6); the picker show 3
but when first entry the activity,set setCurrentHour is true.
Once i scroll the wheel picker, the method setcurrenthour will error

@recwert
Copy link
Author

recwert commented Dec 31, 2015

我这边发现setItemIndex方法会有问题,当我第一次进入Activity,在onCreate中设置的时候还是正常的,但是一旦我有滑动过WheelHourPicker,再去设置setItemIndex就会出现显示错误,而且找不到是什么错误规律,有时候明明设置6,却显示3,明明设置18,却显示23,如果设置19以上,就直接看不见了

@AigeStudio
Copy link
Owner

fix ,cn.aigestudio.wheelpicker:WheelPicker:1.0.3

@r17171709
Copy link

愛哥,setItemIndex在初始化完成之后就不能再设置了啊。我转了一会之后想回到某一个位置,最后显示出来的都正确

@AigeStudio
Copy link
Owner

1.0.3?

@r17171709
Copy link

是的

@duanwencheng
Copy link

爱哥,drawbackground为什么注掉了,我打开后,发现只有默认时是有背景的,一滑动背景就消失了. @OverRide
protected void drawBackground(Canvas canvas) {
mPaint.setColor(Color.RED);
rectCurItem.set(rectCurItem.left,rectCurItem.top,rectCurItem.right-10,rectCurItem.bottom);
canvas.drawRect(rectCurItem,mPaint);
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants