-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22242ed
commit 2451483
Showing
5 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,49 @@ | ||
package com.example.campominado; | ||
|
||
import android.content.Intent; | ||
import android.media.AudioManager; | ||
import android.media.MediaPlayer; | ||
import android.media.SoundPool; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.TextView; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
public class TelaFinal extends AppCompatActivity { | ||
|
||
TextView tentativas; | ||
SoundPool snd; | ||
MediaPlayer musica; | ||
Button voltar; | ||
|
||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.tela_final); | ||
|
||
tentativas = findViewById(R.id.tentativas_final); | ||
voltar = findViewById(R.id.button_start); | ||
|
||
Intent dadosRecebidos = getIntent(); | ||
String numTentativas = dadosRecebidos.getStringExtra("tentativas"); | ||
String tentativas_string = "Número de tentativas: " + numTentativas; | ||
|
||
tentativas.setText(tentativas_string); | ||
|
||
snd = new SoundPool(4, AudioManager.STREAM_MUSIC, 8); | ||
musica = MediaPlayer.create(TelaFinal.this, R.raw.vitoria); | ||
musica.start(); | ||
|
||
voltar.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View view) { | ||
Intent intent = new Intent(TelaFinal.this, MainActivity.class); | ||
startActivity(intent); | ||
finish(); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.