Home » Android » android – Is OnItemSelectedListener.onNothingSelected called at all?

android – Is OnItemSelectedListener.onNothingSelected called at all?

Posted by: admin June 15, 2020 Leave a comment

Questions:

OnItemSelectedListener needs two methods to be implemented: onItemSelected and onNothingSelected. I was curious and tried doing some actions in the onNothingSelected method. However, I have not been able to trigger this event.

Is it actually called?

How to&Answers:

The method onNothingSelected is called when the “selection disappears from this view.”

Here are the Docs on the the OnItemSelectedListener.