I have the following Android code that works great to play sound after a button is pressed:
Button SoundButton2 = (Button)findViewById(R.id.sound2);
SoundButton2.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
mSoundManager.playSound(2);
}
});
My problem is that I want the sound to play immediately after pressing the button (tapping down), and not when releasing (tap). Any ideas on how I can do this?
source
share