android - MediaPlayer setOnPreparedListener doesn't get called for second time -


i using listview adapter displays list of tracks.each list item has play , stop icons play , stop track.the issue having track gets played once when first click on play button.after if stop clicking on stop button , try play track doesn't played.through toast message found out holder.img1.setonclicklistener() method called onprepared() method doesn't called on clicking on play button second time or after that..if replace mmediaplayer.pause(); mmediaplayer.release();still same result..if put mmediaplayer=new mediaplayer();inside onclick() method of holder.img1.setonclicklistenerabove issue resolved clicking on multiple play buttons start playing multiple tracks @ same time don't want..

trying going nightmare due naming conventions , lack of commenting. recommend change naming convention people looking @ code have idea each of variables doing. small comments on can helpful when in understanding trying do.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -