Skip to content

Commit

Permalink
Merge Dev into main
Browse files Browse the repository at this point in the history
* 6.0.1
动态歌词速度(Beta)
添加部分提示
修改默认配置
优化代码

* Prevent channel push failures due to long commit messages (#332)

* Update source file strings.xml (#333)

[ci skip] New translations from Crowdin

* 优化初始化

* 优化 限制可见性更改

* 添加 点击状态栏隐藏歌词(完美)

* 优化布局

* Update source file strings.xml (#340)

[ci skip] New translations from Crowdin

* 优化布局

* Update source file strings.xml (#342)

[ci skip] New translations from Crowdin

* 优化代码

* 优化提示
优化动态速度

* 添加判断

* 优化描述

* 优化点击状态栏隐藏歌词

* Update README.md

* README.md

* 优化提示

* 优化代码

* 添加 MIUI隐藏网速

* 优化布局

* 修复随机动画缺少新动画

* 优化代码

* 优化代码

* 优化代码

* 更新 SystemUILyric.kt

* 添加 歌词模糊边缘类型

* 优化代码

* 添加 根据下一句歌词到来时间,动态调节速度速度(目前只支持apple music,算法也不知道有没有问题)

* 添加 根据下一句歌词到来时间,动态调节速度速度(目前只支持apple music,算法也不知道有没有问题)

* New Crowdin updates (#346)

* Update source file strings.xml
[ci skip] New translations from Crowdin

* Update source file strings.xml
[ci skip] New translations from Crowdin

* Update source file strings.xml
[ci skip] New translations from Crowdin

* Update source file strings.xml
[ci skip] New translations from Crowdin

* Update source file strings.xml
[ci skip] New translations from Crowdin

---------

Co-authored-by: xiao_wine <68009112+xiaowine@users.noreply.github.com>

* 优化代码

* 添加 部分系统息屏切换深色模式时自动重启系统界面

* 优化部分逻辑

* 同步api改动

* 使用kotlin委托属性

* api从git子模块迁移到JitPack

* Update build.gradle.kts

* 优化代码

* 删除无用的name

* lyricGetterApi to 5.0.2

* lyricGetterApi to 5.0.2

* 添加 状态栏滑动切歌

* 调整 添加 状态栏滑动切歌 优先级

* 调整 添加 状态栏滑动切歌 优先级

* 更改string格式

* 删除无用资源

* 优化代码

* 6.0.2
添加 状态栏滑动切歌
添加 点击状态栏隐藏歌词(完美方案)
添加 根据下一句歌词到来时间,动态调节速度速度(目前只支持apple music,算法也不知道有没有问题)
添加 歌词模糊边缘类型
修复 随机动画缺少新动画
添加 MIUI隐藏网速
优化 代码

* 优化 点击状态栏隐藏歌词

* lyricGetterApi to "5.0.3"

* lyricGetterApi to "5.0.3"
优化代码

* 修复暂停音乐后依旧可以点击状态栏显示歌词

* 回撤反色改动

* 删除 正则表达式屏蔽歌词

* 新增歌词动画插值器、歌词动画持续时间和动画淡出淡入效果 (#358)

* 新增歌词动画插值器选项和歌词动画持续时间可配置项

* 新增歌词动画淡出淡入效果

* 代人水个pr
顺便升级下api

* 更新 README.md

* Bump com.github.kyuubiran:EzXHelper from 2.0.6 to 2.0.7 (#364)

Bumps [com.github.kyuubiran:EzXHelper](https://github.com/KyuubiRan/EzXHelper) from 2.0.6 to 2.0.7.
- [Commits](https://github.com/KyuubiRan/EzXHelper/commits)

---
updated-dependencies:
- dependency-name: com.github.kyuubiran:EzXHelper
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 1.9.0 to 1.9.10 (#363)

Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 1.9.0 to 1.9.10.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v1.9.10/ChangeLog.md)
- [Commits](JetBrains/kotlin@v1.9.0...v1.9.10)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* New Crowdin updates (#352)

* Update source file strings.xml
[ci skip] New translations from Crowdin

* Update source file strings.xml
[ci skip] New translations from Crowdin

* Update source file strings.xml
[ci skip] New translations from Crowdin

* Update source file strings.xml
[ci skip] New translations from Crowdin

* 优化代码

* 修复部分情况歌词颜色异常

* gradle to 8.1.1

* gradle to 8.1.2

* Update README.md

* 优化颜色处理

* 添加 miui pad优化
放宽条件继续扩大范围

* 添加 miui pad优化
放宽条件继续扩大范围

* 改错了,同时我不理解为什么找不到库

* 没什么用的优化

* 优化代码

* 修复滑动状态栏无法切歌
修复开启限制可见性变化后 点击隐藏歌词 时间不显示

* 添加 长按状态栏停止音乐
优化相关代码

* 修复miui切换深色后无法使用(现在切换后重新点亮屏幕就行了)

* 优化代码

* Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 1.9.10 to 1.9.20 (#377)

Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 1.9.10 to 1.9.20.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump com.github.kyuubiran:EzXHelper from 2.0.7 to 2.0.8 (#376)

Bumps [com.github.kyuubiran:EzXHelper](https://github.com/KyuubiRan/EzXHelper) from 2.0.7 to 2.0.8.
- [Commits](https://github.com/KyuubiRan/EzXHelper/commits)

---
updated-dependencies:
- dependency-name: com.github.kyuubiran:EzXHelper
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 同步UI库

* 删除无用资源

* 6.1.0

* Revert "Merge branch 'main' into Dev"

This reverts commit e4cbaa2, reversing
changes made to a51617a.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Howard Wu <HowardWu20@outlook.com>
Co-authored-by: 方块君 <86393520+577fkj@users.noreply.github.com>
Co-authored-by: KokomiQAQ <87627969+H-u-T-ao@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: YuKongA <70465933+YuKongA@users.noreply.github.com>
Co-authored-by: QQ little ice <60041789+qqlittleice233@users.noreply.github.com>
Co-authored-by: QQ littleice <1767523953@qq.com>
  • Loading branch information
8 people authored Nov 4, 2023
1 parent 9c22fe0 commit b87e6a9
Show file tree
Hide file tree
Showing 20 changed files with 456 additions and 209 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

[![Icon](/icon.png)]()
![Release Download](https://img.shields.io/github/downloads/577fkj/StatusBarLyric/total?style=flat-square)
![Release Download](https://img.shields.io/github/downloads/Xposed-Modules-Repo/statusbar.lyric/total?style=flat-square)
[![Release Version](https://img.shields.io/github/v/release/577fkj/StatusBarLyric?style=flat-square)](https://github.com/577fkj/StatusBarLyric/releases/latest)
[![GitHub license](https://img.shields.io/github/license/577fkj/StatusBarLyric?style=flat-square)](LICENSE)
[![GitHub Star](https://img.shields.io/github/stars/577fkj/StatusBarLyric?style=flat-square)](https://github.com/577fkj/StatusBarLyric/stargazers)
Expand All @@ -14,8 +15,6 @@
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2F577fkj%2FStatusBarLyric%2Fbadge%3Fref%3Dmain&style=flat)](https://actions-badge.atrox.dev/577fkj/StatusBarLyric/goto?ref=main)
[![GitHub Star](https://img.shields.io/github/stars/577fkj/StatusBarLyric.svg?style=social)](https://github.com/577fkj/StatusBarLyric)
[![电报群](https://img.shields.io/badge/电报群-StatusBatLyric-blue.svg?style=flat-square&color=12b7f5)](https://t.me/StatusBatLyric)
[![爱发电](https://img.shields.io/badge/爱发电-@xiao_wine-blue.svg?style=flat-square&color=12b7f5)](https://afdian.net/@xiao_wine)

</div>

### 理论支持 __所有__ 官方以及部分修改系统
Expand Down
27 changes: 12 additions & 15 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ plugins {
}

val localProperties = Properties()
if (rootProject.file("local.properties").canRead())
localProperties.load(rootProject.file("local.properties").inputStream())
if (rootProject.file("local.properties").canRead()) localProperties.load(rootProject.file("local.properties").inputStream())

android {
namespace = "statusbar.lyric"
Expand All @@ -18,8 +17,8 @@ android {
applicationId = "statusbar.lyric"
minSdk = 26
targetSdk = 34
versionCode = 202
versionName = "6.0.2"
versionCode = 203
versionName = "6.1.0"
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
buildConfigField("long", "BUILD_TIME", "$buildTime")
Expand Down Expand Up @@ -53,20 +52,13 @@ android {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion
}
packagingOptions {
packaging {
resources {
excludes += "/META-INF/**"
excludes += "/kotlin/**"
excludes += "/*.txt"
excludes += "/*.bin"
}
dex {
useLegacyPackaging = true
excludes += "**"
}
}
buildFeatures {
viewBinding = true
buildConfig = true
}
applicationVariants.all {
outputs.all {
Expand All @@ -75,11 +67,16 @@ android {
}
}

kotlin {
sourceSets.all {
languageSettings { languageVersion = "2.0" }
}
}

dependencies {
compileOnly("de.robv.android.xposed:api:82")
implementation(project(":blockmiui"))
implementation(project(":xtoast"))
implementation("com.github.kyuubiran:EzXHelper:2.0.6")
implementation("com.github.xiaowine:Lyric-Getter-Api:5.0.2")
implementation("com.github.kyuubiran:EzXHelper:2.0.8")
implementation("com.github.xiaowine:Lyric-Getter-Api:5.0.5")
}
11 changes: 6 additions & 5 deletions app/src/main/java/statusbar/lyric/activity/page/ChoosePage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@ class ChoosePage : BasePage() {
TitleText(textId = R.string.choose_page_tips)
Line()
dataList.forEach { data ->
TextSA(text = "${data.textViewClassName} ${data.textViewID}", tips = "${data.parentClassName} ${data.parentID}", onClickListener = {
TextSA(text = "${data.textViewClassName} ${data.textViewId}", tips = "${data.parentViewClassName} ${data.parentViewId} textSize:${data.textSize}", onClickListener = {
activity.showView(data)
MIUIDialog(activity) {
setTitle(activity.getString(R.string.select_hook))
setRButton(activity.getString(R.string.ok)) {
config.textViewClassName = data.textViewClassName
config.textViewID = data.textViewID
config.parentClassName = data.parentClassName
config.parentID = data.parentID
config.textViewId = data.textViewId
config.parentViewClassName = data.parentViewClassName
config.parentViewId = data.parentViewId
config.index = data.index
config.textSize = data.textSize
}
setLButton(activity.getString(R.string.cancel))
finally { dismiss() }
}.show()

})
TitleText(activity.getString(R.string.a_a_a_tips).format(data.isRepeat, data.index))
TitleText(activity.getString(R.string.a_a_a_tips).format(data.isRepeat, data.index, data.textSize))
Line()
}
}
Expand Down
16 changes: 1 addition & 15 deletions app/src/main/java/statusbar/lyric/activity/page/ExtendPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,7 @@ class ExtendPage : BasePage() {
})
TextSw(textId = R.string.dynamic_lyric_speed, key = "dynamicLyricSpeed", onClickListener = { changeConfig() })
TextSw(textId = R.string.click_status_bar_to_hide_lyric, key = "clickStatusBarToHideLyric")
TextSA(textId = R.string.regex_replace, onClickListener = {
MIUIDialog(activity) {
setTitle(getString(R.string.regex_replace))
setMessage(getString(R.string.regex_replace_tips))
setEditText(ActivityOwnSP.config.regexReplace, "", config = {
it.inputType = InputType.TYPE_CLASS_TEXT
it.filters = arrayOf(InputFilter.LengthFilter(200))
})
setRButton(getString(R.string.ok)) {
ActivityOwnSP.config.regexReplace = getEditText()
}
setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
TextSw(textId = R.string.long_click_status_bar_stop, key = "longClickStatusBarStop")
Line()
val lyricBlurredEdgesRadiusBinding = GetDataBinding({ ActivityOwnSP.config.lyricBlurredEdges }) { view, _, data ->
view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
Expand Down
42 changes: 42 additions & 0 deletions app/src/main/java/statusbar/lyric/activity/page/LyricPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ class LyricPage : BasePage() {
this["Bottom"] = getString(R.string.lyrics_animation_bottom)
this["Start"] = getString(R.string.lyrics_animation_start)
this["End"] = getString(R.string.lyrics_animation_end)
this["Fade"] = getString(R.string.lyrics_animation_fade)
this["ScaleX"] = getString(R.string.lyrics_animation_scale_x)
this["ScaleY"] = getString(R.string.lyrics_animation_scale_y)
this["ScaleXY"] = getString(R.string.lyrics_animation_scale_x_y)
Expand All @@ -354,5 +355,46 @@ class LyricPage : BasePage() {
}
}
})
val interpolatorMaps: LinkedHashMap<String, String> = LinkedHashMap<String, String>().apply {
this["Linear"] = getString(R.string.lyrics_interpolator_linear)
this["Accelerate"] = getString(R.string.lyrics_interpolator_accelerate)
this["Decelerate"] = getString(R.string.lyrics_interpolator_decelerate)
this["Accelerate&Decelerate"] = getString(R.string.lyrics_interpolator_accelerate_decelerate)
this["Overshoot"] = getString(R.string.lyrics_interpolator_overshoot)
this["Bounce"] = getString(R.string.lyrics_interpolator_bounce)
}
TextSSp(textId = R.string.lyrics_animation_interpolator, currentValue = interpolatorMaps[config.interpolator].toString(), data = {
interpolatorMaps.forEach {
add(it.value) {
config.interpolator = (it.key)
changeConfig()
}
}
})
TextSA(textId = R.string.lyrics_animation_duration, onClickListener = {
MIUIDialog(activity) {
setTitle(getString(R.string.lyrics_animation_duration))
setMessage(getString(R.string.lyric_animation_duration_tips))
setEditText(config.animationDuration.toString(), "500", config = {
it.inputType = InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf(InputFilter.LengthFilter(4))
})
setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in 300..1000) {
config.animationDuration = value
changeConfig()
} else {
throw Exception()
}
} catch (_: Exception) {
ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
}
}
5 changes: 3 additions & 2 deletions app/src/main/java/statusbar/lyric/activity/page/MenuPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.content.pm.PackageManager
import cn.fkj233.ui.activity.annotation.BMMenuPage
import cn.fkj233.ui.activity.data.BasePage
import cn.fkj233.ui.activity.view.SwitchV
import cn.fkj233.ui.activity.view.TextSummaryV
import cn.fkj233.ui.activity.view.TextV
import cn.fkj233.ui.dialog.MIUIDialog
import statusbar.lyric.BuildConfig
Expand Down Expand Up @@ -62,9 +63,9 @@ class MenuPage : BasePage() {

Line()
TitleText(textId = R.string.module_version)
TextSA(textId = R.string.module_version, tips = "${BuildConfig.VERSION_NAME}(${BuildConfig.VERSION_CODE})-${BuildConfig.BUILD_TYPE}")
TextSummaryV(textId = R.string.module_version, tips = "${BuildConfig.VERSION_NAME}(${BuildConfig.VERSION_CODE})-${BuildConfig.BUILD_TYPE}")
val buildTime = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()).format(BuildConfig.BUILD_TIME)
TextSA(textId = R.string.module_build_time, tips = buildTime)
TextSummaryV(textId = R.string.module_build_time, tips = buildTime)
Text()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class SystemSpecialPage : BasePage() {
override fun onCreate() {
if (isMIUI) {
TextSw(textId = R.string.miui_hide_network_speed, key = "mMIUIHideNetworkSpeed")
TextSw(textId = R.string.miui_pad_optimize, key = "mMiuiPadOptimize")
}
Line()
TitleText("Wait for More...")
Expand Down
63 changes: 46 additions & 17 deletions app/src/main/java/statusbar/lyric/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,26 @@ class Config {
set(value) {
config.put("textViewClassName", value)
}
var textViewID: Int
var textViewId: Int
get() {
return config.opt("textViewID", 0)
return config.opt("textViewId", 0)
}
set(value) {
config.put("textViewID", value)
config.put("textViewId", value)
}
var parentClassName: String
var parentViewClassName: String
get() {
return config.opt("parentClassName", "")
return config.opt("parentViewClassName", "")
}
set(value) {
config.put("parentClassName", value)
config.put("parentViewClassName", value)
}
var parentID: Int
var parentViewId: Int
get() {
return config.opt("parentID", 0)
return config.opt("parentViewId", 0)
}
set(value) {
config.put("parentID", value)
config.put("parentViewId", value)
}
var index: Int
get() {
Expand All @@ -115,7 +115,13 @@ class Config {
set(value) {
config.put("index", value)
}

var textSize: Float
get() {
return config.opt("textSize", 0f)
}
set(value) {
config.put("textSize", value)
}

var lyricSize: Int
get() {
Expand Down Expand Up @@ -222,6 +228,13 @@ class Config {
set(value) {
config.put("limitVisibilityChange", value)
}
var longClickStatusBarStop: Boolean
get() {
return config.opt("longClickStatusBarStop", false)
}
set(value) {
config.put("longClickStatusBarStop", value)
}
var lyricLetterSpacing: Int
get() {
return config.opt("lyricLetterSpacing", 0)
Expand Down Expand Up @@ -279,13 +292,6 @@ class Config {
set(value) {
config.put("iconSize", value)
}
var regexReplace: String
get() {
return config.opt("regexReplace", "")
}
set(value) {
config.put("regexReplace", value)
}

private var forceTheIconToBeDisplayed: Boolean
get() {
Expand All @@ -301,6 +307,20 @@ class Config {
set(value) {
config.put("animation", value)
}
var interpolator: String
get() {
return config.opt("interpolator", "Linear")
}
set(value) {
config.put("interpolator", value)
}
var animationDuration: Int
get() {
return config.opt("animationDuration", 500)
}
set(value) {
config.put("animationDuration", value)
}
var viewIndex: Int
get() {
return config.opt("viewIndex", 0)
Expand Down Expand Up @@ -374,6 +394,15 @@ class Config {
set(value) {
config.put("slideStatusBarCutSongsYRadius", value)
}

var mMiuiPadOptimize: Boolean
get() {
return config.opt("mMiuiPadOptimize", false)
}
set(value) {
config.put("mMiuiPadOptimize", value)
}

private val defIconHashMap by lazy {
HashMap<String, String>().apply {
this["com.tencent.qqmusic"] = qQMusicIcon
Expand Down
Loading

0 comments on commit b87e6a9

Please sign in to comment.