Android: replace sound of onclick
问题 I have this code: Button boton = (Button) findViewById(R.id.boton); boton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } }); when I push my button (in Android 4.0.3) I ear a basic sound (a simply click); Can I replace it with a personal sound? Or I can use only MediaPlayer to play a costum sound? 回答1: Try this: public class MyActivity extends Activity { public MyActivity(Bundle onSavedStateInstance) { MediaPlayer mp = MediaPlayer.create(this, R.raw