问题
How to get the number of items in a spinner dynamically?
回答1:
You can try:
mSpinner.getAdapter().getCount();
回答2:
spinerObj.getAdapter.getCount();
for getting number of item
回答3:
spinnerAdapter.getCount();
or spinnerList.size();
来源:https://stackoverflow.com/questions/7467326/how-to-get-the-number-of-items-in-a-spinner