【文件属性】:
文件名称:安卓音频播放器带进度条
文件大小:355KB
文件格式:RAR
更新时间:2016-06-17 18:39:25
播放器
音频播放实现暂停开始等
});
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();
}
}
});
}
【文件预览】:
MediaPlayerDemo
----bin()
--------res()
--------jarlist.cache(119B)
--------classes()
--------AndroidManifest.xml(1KB)
----res()
--------drawable-ldpi()
--------drawable-hdpi()
--------drawable-xhdpi()
--------drawable()
--------values()
--------drawable-mdpi()
--------layout()
----proguard-project.txt(781B)
----assets()
----gen()
--------com()
----src()
--------com()
----.project(851B)
----.classpath(364B)
----project.properties(562B)
----AndroidManifest.xml(1KB)