arcadefire / nice-spinner

A nice spinner for Android
Apache License 2.0
2.84k stars 446 forks source link

列表长度为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 4 years ago

zhushenwudi commented 4 years ago

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 commented 4 years ago

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

zhushenwudi commented 3 years ago

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

NicodeLee commented 2 years ago

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