Spinner#setOnItemSelectedListener calls OnItemSelected event

spinner

As title explains everything, Spinner#setOnItemSelectedListener fires OnItemSelected event… which I think in only very special cases it would be useful.. otherwise it is just annoying.

Moreover, after trying to find out ways of preventing this issue to annoy me, I still cannot find what I think is the best solution for it just yet.

I’ve decided to temporary have member field on my Activity to prevent it calling, which I assume is not the best way for solving this issue. If anybody has better solutions other than having an extra flag to check if this event is not coming from initialization process, then please let me know! :) Thanx.