ignore OnItemSelectedListener firing on create
问题 I'm creating a spinner and I've added an OnItemSelectedListener to it. However I've noticed that it fires on create. Now I was wondering if there was a way to ignore/discard it. I know I could use a boolean value, but that's a bit "dirty". 回答1: Here is my solution. I need to ignore the first item selection event because there is a dependency between the Route Grade Spinner and the Route Checkbox. And all my controls are setup based on a previous visit to the activity. // Used to count the