We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当第一列数据滑到最底部时会崩,错误:
java.lang.ArithmeticException: divide by zero at com.weidongjian.meitu.wheelviewdemo.view.LoopView.onDraw(LoopView.java:298)
The text was updated successfully, but these errors were encountered:
LoopView第298行代码如下: preCurrentIndex = initPosition + change % items.size(); 出现算术错误,只能是items.size()为0的情况。
preCurrentIndex = initPosition + change % items.size();
如果你能提供简单的Demo最好了,可以方便我检查是否控件内部的问题�引起的该错误。
Sorry, something went wrong.
你可能没有考虑到第二或第三列可能没有数据的情况,在这里加个判断 items.size() > 0 就好了。
多谢建议,代码�已更新
No branches or pull requests
当第一列数据滑到最底部时会崩,错误:
The text was updated successfully, but these errors were encountered: