简体   繁体   中英

Android: Unexpectedly Quit When Trying to Switch Activity

I'm new to posting, but have been using the site for help for a while now. So thanks for that!

I'm working on a new app, got everything running well. It's a kids' soundboard. 2 pages of imagebuttons in a relative layout, with onclick listeners which triggers SoundPool.

My question is this:

in testing I've discovered if you're finger is anywhere on the screen where a button is not (say pressing on the background) and then you try to touch a button (multitouch) ... the button press doesn't register. Any way to fix this?

Thanks!

You have to cover additional event types for multi-touch, if you are not covering below Actions, you are not covering multi-touch

MotionEvent.ACTION_POINTER_DOWN: This event happens for any additional finger that touches the screen after the first finger touches

MotionEvent.ACTION_POINTER_UP :This gets fired when a finger is lifted up from the screen and more than one finger is touching the screen.

The explanation is quite tedious. I suggest you to google multi-touch for android. One helpful link is: http://android-developers.blogspot.in/2010/06/making-sense-of-multitouch.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM