Android Spinner: Get the selected item change event

前端 未结 16 2359
挽巷
挽巷 2020-11-22 16:47

How can you set the event listener for a Spinner when the selected item changes?

Basically what I am trying to do is something similar to this:

spinn         


        
16条回答
  •  耶瑟儿~
    2020-11-22 17:33

    spinner1.setOnItemSelectedListener(
        new AdapterView.OnItemSelectedListener() {
            //add some code here
        }
    );
    

提交回复
热议问题