如何在android.the代码中重复这首歌如下。我想重复当前的歌曲,直到我停止。
loop.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
if(isRepeat){
isRepeat = false;
Toast.makeText(getApplicationContext(), "Repeat is OFF", Toast.LENGTH_SHORT).show();
// togglePlay(Songs.current_track);
loop.setImageResource(R.drawable.ic_launcher);
}else{
// make repeat to true
isRepeat = true;
// togglePlay(Songs.current_track);
// make shuffle to false
// isShuffle = false;
loop.setImageResource(R.drawable.ic_launcher);
shuffle.setImageResource(R.drawable.ic_launcher);
}
}
});