音频播放实现暂停开始等 }); btnStop.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub musicStop(); } }); player.setOnCompletionListener(new OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { // TODO Auto-generated method stub if(currentPlayMusicNum parent, View view, int position, long id) { if(saveView==view){ saveView.setBackgroundResource(R.color.nocolor); currentPlayMusicNum=0; } else{ if(saveView!=null) saveView.setBackgroundResource(R.color.nocolor); view.setBackgroundResource(R.color.colorblue); saveView=view; currentPlayMusicNum=position; musicStart(currentPlayMusicNum); } //id_this=position; } }); sb.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onStopTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } @Override public void onStartTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { // TODO Auto-generated method stub if(fromUser){ sb.setProgress(progress); //musicPause(); MusicModel music=musicList.get(currentPlayMusicNum); music.setPlayTime(music.getAllTime()*progress/100); //pausePosition=(int) (music.getAllTime()*progress/100); player.seekTo((int) music.getPlayTime()); player.start(); } } }); }