android - how to make a button click play a sound file every time it been pressed?

前端 未结 5 1723
旧巷少年郎
旧巷少年郎 2020-12-01 12:42

I have open a new project -

Now what I would like to do is this - By pressing on the button I want an mp3 file being played - and also that each time the button is p

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-01 13:21

    Hope this steps will help you to go ahead..

    1.put your mp3 file under row folder (if not exist create one --> Right click on project ->new -> createfolder)

    2.R&D ongoogle to play mp3 first (media player)

    3.on click of button load that perticular file (by setting onclick listner to button)

    best luck

提交回复
热议问题