diff --git a/app/src/main/kotlin/statusbar/lyric/hook/module/SystemUILyric.kt b/app/src/main/kotlin/statusbar/lyric/hook/module/SystemUILyric.kt index cb921d62..27fb9188 100644 --- a/app/src/main/kotlin/statusbar/lyric/hook/module/SystemUILyric.kt +++ b/app/src/main/kotlin/statusbar/lyric/hook/module/SystemUILyric.kt @@ -951,7 +951,7 @@ class SystemUILyric : BaseHook() { } val animation = config.lyricAnimation - isRandomAnima = animation == 9 + isRandomAnima = animation == 11 if (!isRandomAnima) { val interpolator = config.lyricInterpolator val duration = config.animationDuration diff --git a/app/src/main/kotlin/statusbar/lyric/tools/LyricViewTools.kt b/app/src/main/kotlin/statusbar/lyric/tools/LyricViewTools.kt index 639e26a9..ed4b7eb4 100644 --- a/app/src/main/kotlin/statusbar/lyric/tools/LyricViewTools.kt +++ b/app/src/main/kotlin/statusbar/lyric/tools/LyricViewTools.kt @@ -19,7 +19,7 @@ import android.widget.ImageView import statusbar.lyric.view.LyricSwitchView object LyricViewTools { - private var animaList: ArrayList = arrayListOf(1, 2, 3, 4, 5, 6, 7, 8) + private var animaList: ArrayList = arrayListOf(1, 2, 3, 4, 5, 6, 7, 8, 9 ,10) val randomAnima: Int get() = animaList.random() fun getAlphaAnimation(into: Boolean, duration: Long = 250): AnimationSet { @@ -42,6 +42,18 @@ object LyricViewTools { 6 -> ScaleAnimation(0f, 1f, 0f, 1f) 7 -> ScaleAnimation(0f, 1f, 1f, 1f) 8 -> ScaleAnimation(1f, 1f, 0f, 1f) + 9 -> ScaleAnimation( + -1f, 1f, // X 方向从正常比例翻转到反向 + 1f, 1f, // Y 方向保持不变 + Animation.RELATIVE_TO_SELF, 0.5f, // X 轴中心点:视图的中间 + Animation.RELATIVE_TO_SELF, 0.5f // Y 轴中心点:视图的中间 + ) + 10 -> ScaleAnimation( + 1f, 1f, // X 方向保持不变 + -1f, 1f, // Y 方向从正常比例翻转到反向 + Animation.RELATIVE_TO_SELF, 0.5f, // X 轴中心点:视图的中间 + Animation.RELATIVE_TO_SELF, 0.5f // Y 轴中心点:视图的中间 + ) else -> return null }?.apply { duration = t @@ -64,6 +76,18 @@ object LyricViewTools { 6 -> ScaleAnimation(1f, 0f, 1f, 0f) 7 -> ScaleAnimation(1f, 0f, 1f, 1f) 8 -> ScaleAnimation(1f, 1f, 1f, 0f) + 9 -> ScaleAnimation( + 1f, -1f, // X 方向从正常比例翻转到反向 + 1f, 1f, // Y 方向保持不变 + Animation.RELATIVE_TO_SELF, 0.5f, // X 轴中心点:视图的中间 + Animation.RELATIVE_TO_SELF, 0.5f // Y 轴中心点:视图的中间 + ) + 10 -> ScaleAnimation( + 1f, 1f, // X 方向保持不变 + 1f, -1f, // Y 方向从正常比例翻转到反向 + Animation.RELATIVE_TO_SELF, 0.5f, // X 轴中心点:视图的中间 + Animation.RELATIVE_TO_SELF, 0.5f // Y 轴中心点:视图的中间 + ) else -> return null }?.apply { duration = t diff --git a/app/src/main/kotlin/statusbar/lyric/ui/page/LyricPage.kt b/app/src/main/kotlin/statusbar/lyric/ui/page/LyricPage.kt index f779b0e6..bd27985f 100644 --- a/app/src/main/kotlin/statusbar/lyric/ui/page/LyricPage.kt +++ b/app/src/main/kotlin/statusbar/lyric/ui/page/LyricPage.kt @@ -78,6 +78,8 @@ fun LyricPage(navController: NavController, currentStartDestination: MutableStat stringResource(R.string.lyrics_animation_scale_x_y), stringResource(R.string.lyrics_animation_scale_x), stringResource(R.string.lyrics_animation_scale_y), + stringResource(R.string.lyrics_animation_horizontalflip), + stringResource(R.string.lyrics_animation_verticalflip), stringResource(R.string.lyrics_animation_random), ) val lyricAnimSelectedOption = remember { mutableIntStateOf(config.lyricAnimation) } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 65d7168c..ffdd381b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -154,4 +154,6 @@ 确定要重置配置吗? 歌词添加位置 自动处理焦点通知 + "水平翻转" + 垂直翻转 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 691b06bc..076a5e9c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -156,4 +156,6 @@ Are you sure you want to clear the configuration? Lyrics add location Automate focus notifications + Horizontal Flip + Vertical Flip \ No newline at end of file