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

列表长度为0时,会出现adapter.getCount()为null(when the list's size equal 0, the project throw a exception that means adapter.getCount() is null) #162

Open
zhushenwudi opened this issue Apr 6, 2020 · 3 comments

Comments

@zhushenwudi
Copy link

modify the NiceSpinner.java:
@OverRide
public boolean onTouchEvent(MotionEvent event) {
if (isEnabled() && event.getAction() == MotionEvent.ACTION_UP && adapter != null) {
if (!popupWindow.isShowing() && adapter.getCount() > 0) {
showDropDown();
} else {
dismissDropDown();
}
}
return super.onTouchEvent(event);
}

@luncang
Copy link

luncang commented Jul 3, 2020

当列表是空列表时,各种bug,我在自己修改

@zhushenwudi
Copy link
Author

各位,推荐用这个
https://github.com/jaredrummler/MaterialSpinner
暂时没有发现大问题

@NicodeLee
Copy link

@zhushenwudi 这个自定义数据的List列表比较繁琐。需要自定义Adapter

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

3 participants