在Android中设置后如何删除OnSeekBarChangeListener?
我四处搜寻并尝试了一些建议,但仍然没有成功。
我有一个包含搜索栏的列表视图,用于在代码中设置参数。我想基于切换按钮触发搜索栏侦听器,以便用户在滚动列表时不会意外移动搜索栏。
我的问题是,一旦关闭切换,搜索栏侦听器仍然处于活动状态。我尝试将 null 传递给 setOnSeekBarChangeListener,但它不起作用。
感谢您的帮助。我是 Android 的新手,处理用户输入事件链仍然让我感到困惑。预先感谢您的帮助。
I've searched around and tried some of the suggestions but still no success.
I have a listview that contain seekbars that are used to set parameters in the code. I would like to trigger the seekbar listener based on a toggle button so that the user does not accidentally move the seekbars while scrolling the list.
my problem is that once the toggle is turned off, the seekbar listener is still active. I've tried passing null to the setOnSeekBarChangeListener, but it does not work.
thanks for your help. I'm a newbie to Android and handling the user intput chain of events is still confusing to me. Thanks in advance for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这应该有效。
This should work.
试试这个..
编辑:
尝试将焦点设置为 false 像这样..
Try this..
EDIT:
Try setting the focus to false like this..