diff --git a/android/app/src/main/java/cn/toside/music/mobile/lyric/Lyric.java b/android/app/src/main/java/cn/toside/music/mobile/lyric/Lyric.java index e87bac4d..19fcf1c6 100644 --- a/android/app/src/main/java/cn/toside/music/mobile/lyric/Lyric.java +++ b/android/app/src/main/java/cn/toside/music/mobile/lyric/Lyric.java @@ -150,6 +150,13 @@ public class Lyric extends LyricPlayer { // Log.d("Lyric", lineNum + " " + text + " " + (String) line.get("translation")); } + @Override + public void pause() { + super.pause(); + if (!isShowLyric) return; + if (lyricView != null) lyricView.setLyric("", new ArrayList<>(0)); + } + public void lockLyric() { if (lyricView == null) return; lyricView.lockView(); diff --git a/android/app/src/main/java/cn/toside/music/mobile/lyric/LyricView.java b/android/app/src/main/java/cn/toside/music/mobile/lyric/LyricView.java index 33e0b1a4..045efd59 100644 --- a/android/app/src/main/java/cn/toside/music/mobile/lyric/LyricView.java +++ b/android/app/src/main/java/cn/toside/music/mobile/lyric/LyricView.java @@ -348,6 +348,7 @@ public class LyricView extends Activity implements View.OnTouchListener { } public void setLyric(String text, ArrayList extendedLyrics) { + if (text.equals("") && text.equals(currentLyric) && extendedLyrics.size() == 0) return; currentLyric = text; currentExtendedLyrics = extendedLyrics; if (textView == null) return; diff --git a/publish/changeLog.md b/publish/changeLog.md index e05b4d20..dc6f4b45 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,3 +1,5 @@ ### 优化 - 添加“弹出键盘时自动隐藏播放栏”设置,默认启用(原来的行为),若在某些设备上播放栏无法显示时则可以关闭此设置 +- 优化切歌时桌面歌词的切换动画显示 +- 暂停播放时自动隐藏桌面歌词