开发者

Access next,previous,play and pause of mediaplayer in android

In my android application,i want to apply OnPause,OnPlay,Next and previous,volume increase and decrease events on mediaplayer.

Access next,previous,play and pause of mediaplayer in android

In the above image i just want to know how can i perform next,previous,pla开发者_运维百科y,pause events. Could anyone please let me know where i can find these?

Please send me your valuable suggestions.

Thanks in advance:)


I'm a beginner in android (and my English isn't the best.. :( ), but i think you can do that with android.media.MediaPlayer via its methods. For example, first you have to create a SurfaceView and your controll panel in the xml layout or in the code.In your Activity create a MediaPlayer instance and assign it with the SurfaceHolder of the view. Assign your controll "buttons" to the MediaPlayer's methods in the button's OnClickListener.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜