Android: Play mp3 file from raw resource on click of a TextView

前端 未结 4 1305
挽巷
挽巷 2020-12-03 05:11

Hi guys I want to play a certain mp3 file when a text is clicked. For example, I clicked the word \"Nicholas\", the app have to play nicholas.mp3...

Sorry for my mes

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 05:20

    When you create the mPlayer object you should pass it the Context, which is in your case PlayWord.this.

提交回复
热议问题