On the site I found the code:
public void onClick (View v){ index = 0; mp = MediaPlayer.create(getApplicationContext(), sounds[index] ); mp.setLooping(false); mp.start(); mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener(){ public void onCompletion(MediaPlayer mp){ if(index < sounds.length-1){ index++; mp = MediaPlayer.create(getApplicationContext(), sounds[index]); mp.start(); mp.setOnCompletionListener(this); } else mp.release(); } }); } But he plays all the tracks one after the other. Can someone tell me: how do you play a single track when you click on the button? And while the track is playing, the button must be inactive, and the next press plays the second track. And how to make control from the volume + button?