Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.iklikla.eightgame;
- import android.media.MediaPlayer;
- import android.os.Bundle;
- import android.app.Activity;
- import android.view.View;
- import android.widget.Button;
- public class MainActivity extends Activity {
- Button eight = (Button)findViewById(R.id.eightbutton);
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- eight.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- MediaPlayer mp = MediaPlayer.create(MainActivity .this,R.raw.eightsound);
- mp.start();
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement