If what you want is a button what the user can click to play the audio, you can use a MediaPlayer
, as suggested here: how to play audio file in android
If what you want is to make a visual preview of the waveform from the audio file, you can reference this answer, which involves creating a custom view and analyzing the audio file and render the resulting waveform: Show waveform of audio
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…