diff --git a/app/src/main/java/com/lzx/musiclib/home/TestActivity.kt b/app/src/main/java/com/lzx/musiclib/home/TestActivity.kt index 735a19a..c55c34c 100644 --- a/app/src/main/java/com/lzx/musiclib/home/TestActivity.kt +++ b/app/src/main/java/com/lzx/musiclib/home/TestActivity.kt @@ -42,6 +42,7 @@ import kotlinx.android.synthetic.main.activity_test.playMusicById import kotlinx.android.synthetic.main.activity_test.playMusicByInfo import kotlinx.android.synthetic.main.activity_test.playMusicByUrl import kotlinx.android.synthetic.main.activity_test.querySongInfoInLocal +import kotlinx.android.synthetic.main.activity_test.replay import kotlinx.android.synthetic.main.activity_test.restoreMusic import kotlinx.android.synthetic.main.activity_test.rtmpBtn import kotlinx.android.synthetic.main.activity_test.seekBarPro @@ -302,6 +303,9 @@ open class TestActivity : AppCompatActivity() { openN?.setOnClickListener { StarrySky.openNotification() } + replay?.setOnClickListener { + StarrySky.with().replayCurrMusic() + } StarrySky.with().setOnPlayProgressListener(object : OnPlayProgressListener { @SuppressLint("SetTextI18n") diff --git a/app/src/main/res/layout/activity_test.xml b/app/src/main/res/layout/activity_test.xml index 24e2e4d..fc00de8 100644 --- a/app/src/main/res/layout/activity_test.xml +++ b/app/src/main/res/layout/activity_test.xml @@ -171,6 +171,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="同时播放多个音频2" /> + +