nice-spinner
nice-spinner copied to clipboard
当数据为1时产生的一个BUG
调用 nicespinner.attachDataSource(list),当list.size()=1时,nicespinner不会显示任何string
可以通过手动调用setSelectedIndex这个方法来解决,但是这样操作的前提是你的list只能是String,如果是对象的话,这个方法会报类型转换异常。说到底还是库有问题
@arcadefire Can you help solve this bug?
@arcadefire Can you help solve this bug?
只能添加一个一模一样的数据了
@arcadefire Can you help solve this bug?
只能添加一个一模一样的数据了
我下载了源码改了一下,NiceSpinner.setAdapterInternal方法里的 if (adapter.getCount() > 0) 改为 if (adapter.getCount() >= 0)就没问题了,依赖本地代码了
setAdapterInternal
学习到了,大神^_^,哈哈哈