如何重复这首歌直到不停止播放

时间:2014-04-24 08:54:43

标签: android

如何在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);
                }
            }
        });

Here is the complete code

0 个答案:

没有答案