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.
我已经使用 MyOnItemSelectedListener 将项目填充到 Spinner 中并且它可以工作。我的问题是如何在 Spinner 下方的列表视图中设置数据库详细信息。onItemSelected之后应该写什么代码?
在 onItemSelected() 方法中,您可以构建一个数组/光标,用于根据所选微调器项目从数据库中获取相关数据。
然后,您可以使用该数组/光标设置您的列表视图,以根据在微调器中选择的项目填充数据库详细信息。
就是这么简单!