arcadefire/nice-spinner

Textview do not display text when there is only one item of data

Closed this issue · 3 comments

I modified the demo code to reproduce this problem:
20190703100536
20190703102859

note: i fixd this problem by modifying NiceSpinner#setAdapterInternal and changing if (adapter.getCount() > 0) to if (adapter.getCount() >= 0)
Hope this helps you

NiceSpinner NiceSpinner = (NiceSpinner) findViewById (R.id.nice_spinner);
List dataset= new LinkedList < > (arrays . aslist(“One”));
niceSpinner.attachDataSource(dataset);
niceSpinner.setText (dataset.get (0));

I understand, thank you.

i find the repository's newest lib ,just v1.4.3 is also have this question. if the item data is an object ? waht to do?