Seekbar OnSeekBarChangeListener 未调用 DPAD 左右更改?
我有 SeekBar 小部件,尝试通过 dpad 键控制它 - 左右更改位置。
我可以聚焦它,按 dpad 向左/向右更改位置(正确地,如设置 setKeyProgressIncrement
),但是,我的代码无法知道发生了此类更改。在这种情况下,不会调用 OnSeekBarChangeListener
。
查看 AbsSeekBar.java
,我在 onKeyDown
中看到代码,它通过按键移动进度,但它不会调用任何回调。它只调用其内部的onKeyChange,无法被捕获。
有人有办法通过光标键检测搜索栏的移动吗?
我想让我的应用程序在非触摸屏设备上也很好用。
I have SeekBar widget, trying to control it by dpad keys - change position by left and right.
I can focus it, pressing dpad left/right changes position (correctly, as set bysetKeyProgressIncrement
), however, there's no way from my code to know that such change occured. OnSeekBarChangeListener
is not called in this case.
Looking at AbsSeekBar.java
, I see code in onKeyDown
which moves progress by keys, however it doesn't call any callback. It only calls its internal onKeyChange, which can't be trapped.
Anyone has way to detect seekbar movement by cursor keys?
I want make my app nice also on non-touch-screen devices.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论