触摸屏幕时无法使用电容式按钮
我在为 Evo 编码时遇到问题。触摸屏幕时,Evo 将我触摸按钮解释为在屏幕上再次按下,而不是 onKeyDown、onBackPressed 等(它实际上将 MotionEvent 指针计数设置为 2,并且我可以获取我正在操作的坐标)触摸主屏幕之外的区域,例如,触摸后退按钮时为 830*190。)
按钮位置缺少编码(如果每个具有电容式按钮的手机都存在相同的问题,则每个手机的编码都会有所不同) ,有什么办法可以解决这个问题吗?还有其他人在使用不同的电容式按钮设备时遇到此问题吗?
I'm having issues while coding for my Evo. While touching the screen, the Evo interprets me touching the buttons as another press on the screen instead of a onKeyDown, onBackPressed, etc. (It actually sets the MotionEvent pointer count to 2, and I can get the co-ords that I'm touching that are off the main screen, for example, 830*190 when touching the back button.)
Short of coding in the locations of the buttons (which would be different for every phone with capacitive buttons, if they all have the same issue), is there any way to get around this? Does anyone else have this issue with a different capacitive buttoned device?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Evo 上,按钮所在的区域使用与屏幕相同的电容式触摸传感器。您可以通过加载网页并滚动直到手指位于按钮区域来测试这一点。您无需按下这些按钮,只需继续在网页上滚动,因为就手机而言,您仍在触摸“屏幕”。
On the Evo, the area where the buttons are uses the same capacitive touch sensor as the screen. You can test this by loading up a webpage and scrolling until your finger is in the buttons region. Instead of pressing those buttons, you just continue to scroll around on the webpage, because as far as the phone is concerned you're still touching the "screen".