Q:

android - how to play audio and display textview on click a button

I am a beginner. So far I have created an app that counts. I created a button which displays the text but it should also play the whistle sound.
I displayed my java code below.
/**
 * Displays the winning team.
 */

public void displayForWinner(String score) {
    TextView scoreView = (TextView) findViewById(R.id.textView);
    scoreView.setText(String.valueOf(score));
}

A:

To play a short sound effect, create an empty MediaPlayer object:
MediaPlayer mMediaPlayer;

Next, assign a MediaPlayer to it using your context, and sound (Place your sound file under app/src/main/res/raw/) :
mMediaPlayer = MediaPlayer.create(MyActivity.this,R.raw.whistle_sound);

Finally, when you're ready to play your sound, call:
mMediaPlayer.start();

-EDIT-
To make the text change after your sound has completed,  use this:
public class MyActivity extends Activity {
    MediaPlayer mMediaPlayer;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_menu);
        mMediaPlayer = MediaPlayer.create(MyActivity.this,R.raw.whistle_sound);
    }
    public void displayForWinner(String score) {
        final String FinalScore = score;
        mMediaPlayer.start();
        mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
            @Override
            public void onCompletion(MediaPlayer mediaPlayer) {
                TextView scoreView = (TextView) findViewById(R.id.textView);
                scoreView.setText(String.valueOf(FinalScore));
            }
        });
    }
}  

Also, consider trimming your audio clip to reduce delay.

