I am using an ArrayAdapter<CharSequence>
to populate the items to list in a android.widget.Spinner
. That works all fine.
But now I want to keep the list of items dynamic, i.e. I want to be able to add/remove items from the selection list at runtime. However, when I call adapter.add(item)
or adapter.remove(item)
I always get a UnsupportedOperationException
, even though the Javadocs of the ArrayAdapter
class describe these two methods as to be usable for exactly that intended purpose.
Is this a bug, really not implemented or what am I missing here?