Skip to content Skip to sidebar Skip to footer

Android Spinner - How Do I Remove The Current Selection?

I have some dependencies between my spinners and it happens, that a spinner becomes empty. The problem now is, that I don't know how to clear the spinner, I'm adopting the data of

Solution 1:

I'm not sure what you want, but to delete all itens in your spinner you can set the adapter null, like this:

mySpinner.setAdapter(null);

and if you want to remove a specific item, then you should remove it from your adapter and set your spinner again

mySpinner.setAdapter(myAdapter);

Post a Comment for "Android Spinner - How Do I Remove The Current Selection?"