Spinner onItemSelected 被错误调用(没有用户操作) [英] Spinner onItemSelected called erroneously (without user action)

查看:28
本文介绍了Spinner onItemSelected 被错误调用(没有用户操作)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个显示在对话框视图中的微调器,对话框开始的那一刻 onItemSelected 被调用.我真的不想处理这个,但只有在用户做出选择时才处理.所以我要么需要阻止这种情况(可能是因为没有设置默认值?),要么我需要知道不是用户做出了这个选择?

I have a spinner which I am showing in a dialog view, and the moment the dialog starts onItemSelected is called. I don't really want to process this but only when user makes the selection. So I either need to prevent this (maybe because no default value is set?), or I need to know it is not the user that is making this selection?

推荐答案

Androider,我已经找到了解决这个问题的方法并贴在这里(附代码示例):

Androider, I have found a solution for this problem and posted it here (with code sample):

Spinner onItemSelected() 执行时不应该

这篇关于Spinner onItemSelected 被错误调用(没有用户操作)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆