1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| package ndoisn.slightlessmiragev3;
import android.content.Intent;
import android.media.MediaPlayer;
import android.provider.MediaStore;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class menu_principal extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.menu_principal);
Button StartButton = findViewById(R.id.button2);
StartButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent IntentNext = new Intent(menu_principal.this, options.class);
startActivity(IntentNext);
}
}
);
Button OptionButton = findViewById(R.id.button4);
OptionButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent IntentOption = new Intent(menu_principal.this, options.class);
startActivity(IntentOption);
}
});
MediaPlayer mPlayer = MediaPlayer.create(menu_principal.this, R.raw.gymnopedie);
mPlayer.start();
}
} |
Partager