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.
我试图在不使用事件的情况下从微调器(android)获取值,例如从文本框中获取值。谢谢。
只需调用 Spinner 上的选定项目即可
String Text = mySpinner.getSelectedItem().toString();
您有来自 Spinner 派生的 AdapterView 类的 getSelectedXXX 方法:
获取选定项()
getSelectedItemPosition()
getSelectedItemId()