android - I've got to create sound if you click the button. With my music file -


i've got create sound if click button. music file

try one.

 button 1 = (button)this.findviewbyid(r.id.button1);             final mediaplayer mp = mediaplayer.create(this, r.raw.soho);             one.setonclicklistener(new onclicklistener(){                  public void onclick(view v) {                     mp.start();                 }             });     

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -