From d08c0dbbbae3e0bd67c246127aa4b711fa245b5f Mon Sep 17 00:00:00 2001 From: lizixian Date: Wed, 21 Apr 2021 14:30:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E9=87=8D?= =?UTF-8?q?=E6=92=AD=E5=BD=93=E5=89=8D=E9=9F=B3=E9=A2=91=E7=9A=84api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/lzx/musiclib/home/TestActivity.kt | 4 ++++ app/src/main/res/layout/activity_test.xml | 6 ++++++ starrysky/build.gradle | 6 +++--- .../java/com/lzx/starrysky/control/PlayerControl.kt | 7 +++++++ .../java/com/lzx/starrysky/manager/PlaybackManager.kt | 10 ++++++++++ 5 files changed, 30 insertions(+), 3 deletions(-) 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" /> + +