5

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?

SlowSeer
  • 141
  • 2
  • 2
    Sounds like a hardware issue. – Ignacio Vazquez-Abrams Nov 12 '10 at 20:38
  • FWIW, my Nexus One has the same problem. – benvd Nov 12 '10 at 20:40
  • @benvd, Darn! I was hoping it would turn out to be an evo-only problem so I could just hard code in the location of those buttons, but I don't want to deal with that effort for multiple devices. I'll probably end up having to just make buttons on the screen instead of using the default ones. – SlowSeer Nov 12 '10 at 21:01
  • @Slapps: Just to confirm, your problem is that you are simultaneously touching the screen and trying to push one of the buttons? If so, I'm not sure whether that behavior is defined anywhere. – CommonsWare Nov 12 '10 at 22:53
  • @CommonsWare: Yes, thats my problem. It seems to work fine in the emulator since I guess that emulates physical buttons (I can drag an object in my app with the mouse, and press ESC to emulate the back button being pressed with no issues). I have no idea if devices with physical buttons do this or not though, the only device I have available is an Evo. – SlowSeer Nov 13 '10 at 14:02
  • 1
    @Slapps: If you want, create a test project that can be used to determine if the problem exists on any given device, and post a link to it here. – CommonsWare Nov 13 '10 at 14:06

1 Answers1

0

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".

cjm
  • 120
  • 2
  • 11