Android - Enter button with finger detection?

Posted by Normano on Stack Overflow See other posts from Stack Overflow or by Normano
Published on 2010-04-02T22:40:07Z Indexed on 2010/04/02 22:43 UTC
Read the original article Hit count: 347

Filed under:

Hello, I'm working on a soundboard, however I've got a problem when it come to drag the finger over the screen to play the sounds for the buttons I drag the finger over. Button Button3 = (Button)findViewById(R.id.button03); Button3.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if(event.getAction() == MotionEvent.ACTION_DOWN){ mp.playSound(3); } return false; } }); Do anyone know how I can detect when a finger enter a button and not click the button? THanks :)

© Stack Overflow or respective owner

Related posts about android