Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我单击微调器中的第一项或默认项时,微调器就会折叠。所有其他项目执行所需的操作。如何让第一个项目触发一个动作?
您遇到了这个问题(假设您已经实现了setOnItemSelectedListener()for the Spinner),因为只有在您更改 Selection 时才会Spinner调用onItemSelected(),换句话说,在Spinner. 因此,Spinner当您选择默认选择时会简单地折叠。
setOnItemSelectedListener()
Spinner
onItemSelected()
希望这个解释有所帮助。