From d82bdcbbc64cea1e3a09fa38f380ef3108bf3812 Mon Sep 17 00:00:00 2001
From: xiao_wine <68009112+xiaowine@users.noreply.github.com>
Date: Fri, 4 Aug 2023 21:11:58 +0800
Subject: [PATCH] 6.0.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
添加 状态栏滑动切歌
添加 点击状态栏隐藏歌词(完美方案)
添加 根据下一句歌词到来时间,动态调节速度速度(目前只支持apple music,算法也不知道有没有问题)
添加 歌词模糊边缘类型
修复 随机动画缺少新动画
添加 MIUI隐藏网速
优化 代码
---
.github/workflows/Android.yml | 2 -
.github/workflows/Android_Dev.yml | 11 +-
.gitmodules | 5 +-
LyricGetterApi | 1 -
README.md | 3 +-
app/build.gradle.kts | 13 +-
app/proguard-log.pro | 54 ---
app/proguard-rules.pro | 1 -
app/src/main/AndroidManifest.xml | 4 +-
.../lyric/activity/SettingsActivity.kt | 58 +--
.../lyric/activity/page/ChoosePage.kt | 10 +-
.../lyric/activity/page/ExtendPage.kt | 138 +++++++-
.../statusbar/lyric/activity/page/HookPage.kt | 16 +-
.../statusbar/lyric/activity/page/IconPage.kt | 64 ++--
.../lyric/activity/page/LyricPage.kt | 208 +++++------
.../statusbar/lyric/activity/page/MainPage.kt | 20 +-
.../statusbar/lyric/activity/page/MenuPage.kt | 36 +-
.../lyric/activity/page/SystemSpecialPage.kt | 17 +
.../java/statusbar/lyric/config/Config.kt | 42 +++
.../java/statusbar/lyric/hook/BaseHook.kt | 1 -
.../java/statusbar/lyric/hook/MainHook.kt | 12 +-
.../statusbar/lyric/hook/app/SystemUILyric.kt | 331 +++++++++++++-----
.../statusbar/lyric/hook/app/SystemUITest.kt | 11 +-
.../lyric/tools/ActivityTestTools.kt | 6 +-
.../statusbar/lyric/tools/ActivityTools.kt | 24 +-
.../java/statusbar/lyric/tools/ConfigTools.kt | 4 +-
.../java/statusbar/lyric/tools/LogTools.kt | 5 +-
.../main/java/statusbar/lyric/tools/Tools.kt | 39 ++-
.../lyric/view/EdgeTransparentView.kt | 52 ++-
.../statusbar/lyric/view/LyricTextView.kt | 2 +-
app/src/main/res/values-zh-rCN/strings.xml | 286 +++++++--------
app/src/main/res/values-zh-rTW/strings.xml | 286 +++++++--------
app/src/main/res/values/strings.xml | 286 +++++++--------
build.gradle.kts | 2 +-
gradle.properties | 4 +-
gradle/wrapper/gradle-wrapper.properties | 2 +-
icon.png | Bin 0 -> 8161 bytes
settings.gradle.kts | 2 +-
38 files changed, 1182 insertions(+), 876 deletions(-)
delete mode 160000 LyricGetterApi
delete mode 100644 app/proguard-log.pro
create mode 100644 app/src/main/java/statusbar/lyric/activity/page/SystemSpecialPage.kt
create mode 100644 icon.png
diff --git a/.github/workflows/Android.yml b/.github/workflows/Android.yml
index 92e8c95f..8ed0e9bb 100644
--- a/.github/workflows/Android.yml
+++ b/.github/workflows/Android.yml
@@ -41,8 +41,6 @@ jobs:
- name: Build with Gradle
run: |
- echo 'org.gradle.parallel=true' >> gradle.properties
- echo 'org.gradle.jvmargs=-Xmx4g' >> gradle.properties
./gradlew assemble
./gradlew bundleRelease
diff --git a/.github/workflows/Android_Dev.yml b/.github/workflows/Android_Dev.yml
index a47ce68e..eb2c600d 100644
--- a/.github/workflows/Android_Dev.yml
+++ b/.github/workflows/Android_Dev.yml
@@ -2,9 +2,9 @@ name: Android CI Dev
on:
push:
- branches: [ Dev,new ]
+ branches: [Dev, new]
paths-ignore:
- - 'README.md'
+ - "README.md"
pull_request:
jobs:
@@ -31,8 +31,8 @@ jobs:
- name: set up JDK 17
uses: actions/setup-java@v3
with:
- java-version: '17'
- distribution: 'microsoft'
+ java-version: "17"
+ distribution: "microsoft"
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
@@ -77,6 +77,7 @@ jobs:
CHANNEL_ID: ${{ secrets.CHANNEL_DEV_ID }}
BOT_TOKEN: ${{ secrets.BOT_DEV_TOKEN }}
MAPPING: ./app/build/outputs/mapping/release/mapping.txt
+ COMMIT_URL: ${{ github.event.head_commit.url }}
COMMIT_MESSAGE: |+
Github CI Build
@@ -86,5 +87,5 @@ jobs:
run: |
export RELEASE=$(find ./app/build/outputs/apk/release -name "*.apk")
export DEBUG=$(find ./app/build/outputs/apk/debug -name "*.apk")
- ESCAPED=`python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))'`
+ ESCAPED=`python3 -c 'import json,os,urllib.parse; msg = json.dumps(os.environ["COMMIT_MESSAGE"]); print(urllib.parse.quote(msg if len(msg) <= 1024 else json.dumps(os.environ["COMMIT_URL"])))'`
curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${CHANNEL_ID}&media=%5B%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2Frelease%22%7D%2C%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2Fdebug%22%7D%2C%7B%22type%22%3A%22document%22%2C%22media%22%3A%22attach%3A%2F%2Fmapping%22%2C%22parse_mode%22%3A%22MarkdownV2%22%2C%22caption%22%3A${ESCAPED}%7D%5D" -F release="@$RELEASE" -F debug="@$DEBUG" -F mapping="@$MAPPING"
diff --git a/.gitmodules b/.gitmodules
index 0fe35f55..d2a498e3 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,7 +4,4 @@
[submodule "xtoast"]
path = xtoast
- url = https://github.com/Wine-Network/xToast
-[submodule "LyricGetterApi"]
- path = LyricGetterApi
- url = https://github.com/xiaowine/LyricGetterApi
+ url = https://github.com/Wine-Network/xToast
\ No newline at end of file
diff --git a/LyricGetterApi b/LyricGetterApi
deleted file mode 160000
index 3f2a5236..00000000
--- a/LyricGetterApi
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 3f2a523612f86000699c9d1dd88b29459785c848
diff --git a/README.md b/README.md
index de7d8894..c2228e5e 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
-
+[![Icon](/icon.png)]()
![Release Download](https://img.shields.io/github/downloads/577fkj/StatusBarLyric/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)
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 1d9c9b10..29423f41 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -18,12 +18,12 @@ android {
applicationId = "statusbar.lyric"
minSdk = 26
targetSdk = 34
- versionCode = 201
- versionName = "6.0.1"
+ versionCode = 202
+ versionName = "6.0.2"
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
buildConfigField("long", "BUILD_TIME", "$buildTime")
- buildConfigField("int", "API_VERSION", "4")
+ buildConfigField("int", "API_VERSION", "5")
buildConfigField("int", "CONFIG_VERSION", "3")
}
val config = localProperties.getProperty("androidStoreFile")?.let {
@@ -43,7 +43,7 @@ android {
release {
isMinifyEnabled = true
isShrinkResources = true
- setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro", "proguard-log.pro"))
+ setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"))
}
}
compileOptions {
@@ -66,10 +66,11 @@ android {
}
buildFeatures {
viewBinding = true
+ buildConfig = true
}
applicationVariants.all {
outputs.all {
- (this as BaseVariantOutputImpl).outputFileName = "StatusBarLyric-$versionName($versionCode)-$name-$buildTime.apk"
+ (this as BaseVariantOutputImpl).outputFileName = "StatusBarLyric-$versionName-$versionCode-$name-$buildTime.apk"
}
}
}
@@ -79,6 +80,6 @@ dependencies {
compileOnly("de.robv.android.xposed:api:82")
implementation(project(":blockmiui"))
implementation(project(":xtoast"))
- implementation(project(":LyricGetterApi"))
implementation("com.github.kyuubiran:EzXHelper:2.0.6")
+ implementation("com.github.xiaowine:Lyric-Getter-Api:5.0.2")
}
diff --git a/app/proguard-log.pro b/app/proguard-log.pro
deleted file mode 100644
index 4f1b09aa..00000000
--- a/app/proguard-log.pro
+++ /dev/null
@@ -1,54 +0,0 @@
-##########################################################################################################
-# 作者:Sollyu
-# 日期:2020-11-02
-# 内容:发布版本移除日志,kotlin编译时带的而外信息,增强反调试难度
-# 使用:proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard-log.pro'
-##########################################################################################################
-
-##########################################################################################################
-# 删除安卓日志
--assumenosideeffects class android.util.Log {
- public static *** d(...);
- public static *** v(...);
- public static *** w(...);
- public static *** e(...);
-}
-
-##########################################################################################################
-# 删除Kotlin编译时可能生成显示变量的方法
--assumenosideeffects class kotlin.jvm.internal.Intrinsics {
- public static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String);
- public static void checkFieldIsNotNull(java.lang.Object, java.lang.String);
- public static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String);
- public static void checkNotNull(java.lang.Object);
- public static void checkNotNull(java.lang.Object, java.lang.String);
- public static void checkNotNullExpressionValue(java.lang.Object, java.lang.String);
- public static void checkNotNullParameter(java.lang.Object, java.lang.String);
- public static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
- public static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String);
- public static void throwUninitializedPropertyAccessException(java.lang.String);
-}
-
-##########################################################################################################
-# 会暴露变量名称
--assumenosideeffects class java.util.Objects {
- public static java.lang.Object requireNonNull(java.lang.Object, java.lang.String);
-}
-
-##########################################################################################################
-# 删除slf4j的日志输出
--assumenosideeffects interface org.slf4j.Logger {
- public void trace(...);
- public void debug(...);
- public void info(...);
- public void warn(...);
- public void error(...);
-
- public boolean isTraceEnabled(...);
- public boolean isDebugEnabled(...);
- public boolean isWarnEnabled(...);
-}
-
--assumenosideeffects class org.slf4j.LoggerFactory {
- public static ** getLogger(...);
-}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
index 4cb7e0da..adf6c576 100644
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -23,4 +23,3 @@
-keep class statusbar.lyric.hook.MainHook
-keep class statusbar.lyric.activity.page.*
-keep class cn.lyric.getter.api.data.*{*;}
--repackageclasses "截图看NM日志"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 3c5dd0b6..9456125f 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -8,7 +8,7 @@
+ android:value="@string/xposed_tips" />
diff --git a/app/src/main/java/statusbar/lyric/activity/SettingsActivity.kt b/app/src/main/java/statusbar/lyric/activity/SettingsActivity.kt
index 982b19b9..ccf7c949 100644
--- a/app/src/main/java/statusbar/lyric/activity/SettingsActivity.kt
+++ b/app/src/main/java/statusbar/lyric/activity/SettingsActivity.kt
@@ -43,6 +43,7 @@ import statusbar.lyric.activity.page.LyricPage
import statusbar.lyric.activity.page.MainPage
import statusbar.lyric.activity.page.MenuPage
import statusbar.lyric.activity.page.HookPage
+import statusbar.lyric.activity.page.SystemSpecialPage
import statusbar.lyric.config.ActivityOwnSP
import statusbar.lyric.config.ActivityOwnSP.updateConfigVer
import statusbar.lyric.data.Data
@@ -60,13 +61,14 @@ class SettingsActivity : MIUIActivity() {
override fun register() {
- registerPage(MainPage::class.java, activity.getString(R.string.AppName))
- registerPage(MenuPage::class.java, activity.getString(R.string.Menu))
- registerPage(HookPage::class.java, activity.getString(R.string.HookPage))
- registerPage(LyricPage::class.java, activity.getString(R.string.LyricPage))
- registerPage(IconPage::class.java, activity.getString(R.string.IconPage))
- registerPage(ChoosePage::class.java, activity.getString(R.string.ChoosePage))
- registerPage(ExtendPage::class.java, activity.getString(R.string.ChoosePage))
+ registerPage(MainPage::class.java, activity.getString(R.string.app_name))
+ registerPage(MenuPage::class.java, activity.getString(R.string.menu))
+ registerPage(HookPage::class.java, activity.getString(R.string.hook_page))
+ registerPage(LyricPage::class.java, activity.getString(R.string.lyric_page))
+ registerPage(IconPage::class.java, activity.getString(R.string.icon_page))
+ registerPage(ChoosePage::class.java, activity.getString(R.string.choose_page))
+ registerPage(ExtendPage::class.java, activity.getString(R.string.choose_page))
+ registerPage(SystemSpecialPage::class.java, activity.getString(R.string.system_special_page))
}
override fun onCreate(savedInstanceState: Bundle?) {
@@ -95,25 +97,25 @@ class SettingsActivity : MIUIActivity() {
super.onDestroy()
}
- private fun checkLSPosed(): Boolean {
- return try {
- setSP(ActivityOwnSP.ownSP)
- updateConfigVer()
- init()
- true
- } catch (e: Exception) {
- e.printStackTrace()
- MIUIDialog(this) {
- setTitle(R.string.FirstUseTips)
- setMessage(R.string.NotSupportXposedFramework)
- setRButton(R.string.ReStartApp) {
- ActivityTools.restartApp()
- }
- setCancelable(false)
- }.show()
- false
+ private fun checkLSPosed(): Boolean {
+ return try {
+ setSP(ActivityOwnSP.ownSP)
+ updateConfigVer()
+ init()
+ true
+ } catch (e: Exception) {
+ e.printStackTrace()
+ MIUIDialog(this) {
+ setTitle(R.string.first_use_tips)
+ setMessage(R.string.not_support_xposed_framework)
+ setRButton(R.string.re_start_app) {
+ ActivityTools.restartApp()
+ }
+ setCancelable(false)
+ }.show()
+ false
+ }
}
- }
private fun init() {
@@ -156,9 +158,9 @@ class SettingsActivity : MIUIActivity() {
}!!
if (dataList.size == 0) {
MIUIDialog(context) {
- setTitle(context.getString(R.string.NotFoundHook))
- setMessage(context.getString(R.string.NotFoundHookTips))
- setRButton(context.getText(R.string.OK)) {
+ setTitle(context.getString(R.string.not_found_hook))
+ setMessage(context.getString(R.string.not_found_hook_tips))
+ setRButton(context.getText(R.string.ok)) {
dismiss()
}
}.show()
diff --git a/app/src/main/java/statusbar/lyric/activity/page/ChoosePage.kt b/app/src/main/java/statusbar/lyric/activity/page/ChoosePage.kt
index 7594b57e..5d5afb58 100644
--- a/app/src/main/java/statusbar/lyric/activity/page/ChoosePage.kt
+++ b/app/src/main/java/statusbar/lyric/activity/page/ChoosePage.kt
@@ -11,26 +11,26 @@ import statusbar.lyric.tools.ActivityTestTools.showView
@BMPage
class ChoosePage : BasePage() {
override fun onCreate() {
- TitleText(textId = R.string.ChoosePageTips)
+ TitleText(textId = R.string.choose_page_tips)
Line()
dataList.forEach { data ->
TextSA(text = "${data.textViewClassName} ${data.textViewID}", tips = "${data.parentClassName} ${data.parentID}", onClickListener = {
activity.showView(data)
MIUIDialog(activity) {
- setTitle(activity.getString(R.string.SelectHook))
- setRButton(activity.getString(R.string.OK)) {
+ 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.index = data.index
}
- setLButton(activity.getString(R.string.Cancel))
+ setLButton(activity.getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TitleText(activity.getString(R.string.AAATips).format(data.isRepeat, data.index))
+ TitleText(activity.getString(R.string.a_a_a_tips).format(data.isRepeat, data.index))
Line()
}
}
diff --git a/app/src/main/java/statusbar/lyric/activity/page/ExtendPage.kt b/app/src/main/java/statusbar/lyric/activity/page/ExtendPage.kt
index bf201402..d5e664e3 100644
--- a/app/src/main/java/statusbar/lyric/activity/page/ExtendPage.kt
+++ b/app/src/main/java/statusbar/lyric/activity/page/ExtendPage.kt
@@ -1,36 +1,152 @@
package statusbar.lyric.activity.page
+import android.text.InputFilter
+import android.text.InputType
+import android.view.View
import cn.fkj233.ui.activity.annotation.BMPage
import cn.fkj233.ui.activity.data.BasePage
+import cn.fkj233.ui.dialog.MIUIDialog
import statusbar.lyric.R
import statusbar.lyric.config.ActivityOwnSP
+import statusbar.lyric.tools.ActivityTools
import statusbar.lyric.tools.ActivityTools.changeConfig
@BMPage
class ExtendPage : BasePage() {
override fun onCreate() {
val indexMaps: LinkedHashMap
= LinkedHashMap().apply {
- this[0] = getString(R.string.AddLocationStart)
- this[1] = getString(R.string.AddLocationEnd)
+ this[0] = getString(R.string.add_location_start)
+ this[1] = getString(R.string.add_location_end)
}
- TextSSp(textId = R.string.LyricAddLocation, currentValue = indexMaps[ActivityOwnSP.config.viewIndex].toString(), data = {
+ TextSSp(textId = R.string.lyric_add_location, currentValue = indexMaps[ActivityOwnSP.config.viewIndex].toString(), data = {
indexMaps.forEach {
add(it.value) { ActivityOwnSP.config.viewIndex = it.key }
}
})
- TextSw(textId = R.string.HideNotificationIcon, key = "hideNotificationIcon", onClickListener = { changeConfig() })
- TextSSw(textId = R.string.LimitVisibilityChange, tipsId = R.string.LimitVisibilityChangeTips, key = "limitVisibilityChange")
- TextSw(textId = R.string.HideLyricWhenLockScreen, key = "hideLyricWhenLockScreen", defValue = true)
- TextSw(textId = R.string.HideCarrier, key = "hideCarrier")
+ TextSw(textId = R.string.hide_notification_icon, key = "hideNotificationIcon", onClickListener = { changeConfig() })
+ TextSSw(textId = R.string.limit_visibility_change, tipsId = R.string.limit_visibility_change_tips, key = "limitVisibilityChange")
+ TextSw(textId = R.string.hide_lyric_when_lock_screen, key = "hideLyricWhenLockScreen", defValue = true)
+ TextSw(textId = R.string.hide_carrier, key = "hideCarrier")
val lyricColorScheme: LinkedHashMap = LinkedHashMap().apply {
- this[0] = getString(R.string.ColorScheme1)
- this[1] = getString(R.string.ColorScheme2)
+ this[0] = getString(R.string.color_scheme1)
+ this[1] = getString(R.string.color_scheme2)
}
- TextSSp(textId = R.string.LyricColorScheme, currentValue = lyricColorScheme[ActivityOwnSP.config.lyricColorScheme].toString(), data = {
+ TextSSp(textId = R.string.lyric_color_scheme, currentValue = lyricColorScheme[ActivityOwnSP.config.lyricColorScheme].toString(), data = {
lyricColorScheme.forEach {
add(it.value) { ActivityOwnSP.config.lyricColorScheme = it.key }
}
})
- TextSw(textId = R.string.DynamicLyricSpeed, key = "dynamicLyricSpeed", onClickListener = { changeConfig() })
+ 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()
+ })
+ Line()
+ val lyricBlurredEdgesRadiusBinding = GetDataBinding({ ActivityOwnSP.config.lyricBlurredEdges }) { view, _, data ->
+ view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
+ }
+ TextSSw(textId = R.string.lyric_blurred_edges, key = "lyricBlurredEdges", defValue = false, onClickListener = {
+ lyricBlurredEdgesRadiusBinding.send(it)
+ })
+ TextSA(textId = R.string.lyric_blurred_edges_radius, onClickListener = {
+ MIUIDialog(activity) {
+ setTitle(getString(R.string.lyric_blurred_edges_radius))
+ setMessage(getString(R.string.lyric_blurred_edges_radius_tips))
+ setEditText(ActivityOwnSP.config.lyricBlurredEdgesRadius.toString(), "40", config = {
+ it.inputType = InputType.TYPE_CLASS_NUMBER
+ it.filters = arrayOf(InputFilter.LengthFilter(3))
+ })
+ setRButton(getString(R.string.ok)) {
+ try {
+ val value = getEditText().toInt()
+ if (value in 0..100) {
+ ActivityOwnSP.config.lyricBlurredEdgesRadius = value
+ } else {
+ throw Exception()
+ }
+ } catch (_: Exception) {
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
+ }
+ }
+ setLButton(getString(R.string.cancel))
+ finally { dismiss() }
+ }.show()
+ }, dataBindingRecv = lyricBlurredEdgesRadiusBinding.binding.getRecv(1))
+ val lyricBlurredEdgesType: LinkedHashMap = LinkedHashMap().apply {
+ this[0] = getString(R.string.lyric_blurred_edges_type_all)
+ this[1] = getString(R.string.lyric_blurred_edges_type_start)
+ this[2] = getString(R.string.lyric_blurred_edges_type_end)
+ }
+ TextSSp(textId = R.string.lyric_blurred_edges_type, currentValue = lyricBlurredEdgesType[ActivityOwnSP.config.lyricBlurredEdgesType].toString(), data = {
+ lyricBlurredEdgesType.forEach {
+ add(it.value) { ActivityOwnSP.config.lyricBlurredEdgesType = it.key }
+ }
+ }, dataBindingRecv = lyricBlurredEdgesRadiusBinding.binding.getRecv(1))
+ Line()
+ val slideStatusBarCutSongsBinding = GetDataBinding({ ActivityOwnSP.config.slideStatusBarCutSongs }) { view, _, data ->
+ view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
+ }
+ TextSw(textId = R.string.slide_status_bar_cut_songs, key = "slideStatusBarCutSongs", onClickListener = { slideStatusBarCutSongsBinding.send(it) })
+ TextSA(textId = R.string.slide_status_bar_cut_songs_x_radius, onClickListener = {
+ MIUIDialog(activity) {
+ setTitle(getString(R.string.slide_status_bar_cut_songs_x_radius))
+ setMessage(getString(R.string.slide_status_bar_cut_songs_x_radius_tips))
+ setEditText(ActivityOwnSP.config.slideStatusBarCutSongsXRadius.toString(), "150", config = {
+ it.inputType = InputType.TYPE_CLASS_NUMBER
+ it.filters = arrayOf(InputFilter.LengthFilter(4))
+ })
+ setRButton(getString(R.string.ok)) {
+ try {
+ val value = getEditText().toInt()
+ if (value in 20..2000) {
+ ActivityOwnSP.config.slideStatusBarCutSongsXRadius = value
+ } else {
+ throw Exception()
+ }
+ } catch (_: Exception) {
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
+ }
+ }
+ setLButton(getString(R.string.cancel))
+ finally { dismiss() }
+ }.show()
+ }, dataBindingRecv = slideStatusBarCutSongsBinding.binding.getRecv(1))
+ TextSA(textId = R.string.slide_status_bar_cut_songs_y_radius, onClickListener = {
+ MIUIDialog(activity) {
+ setTitle(getString(R.string.slide_status_bar_cut_songs_y_radius))
+ setMessage(getString(R.string.slide_status_bar_cut_songs_y_radius_tips))
+ setEditText(ActivityOwnSP.config.slideStatusBarCutSongsYRadius.toString(), "25", config = {
+ it.inputType = InputType.TYPE_CLASS_NUMBER
+ it.filters = arrayOf(InputFilter.LengthFilter(4))
+ })
+ setRButton(getString(R.string.ok)) {
+ try {
+ val value = getEditText().toInt()
+ if (value in 10..100) {
+ ActivityOwnSP.config.slideStatusBarCutSongsYRadius = value
+ } else {
+ throw Exception()
+ }
+ } catch (_: Exception) {
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
+ }
+ }
+ setLButton(getString(R.string.cancel))
+ finally { dismiss() }
+ }.show()
+ }, dataBindingRecv = slideStatusBarCutSongsBinding.binding.getRecv(1))
+ Line()
}
}
\ No newline at end of file
diff --git a/app/src/main/java/statusbar/lyric/activity/page/HookPage.kt b/app/src/main/java/statusbar/lyric/activity/page/HookPage.kt
index 492a01a5..3752a573 100644
--- a/app/src/main/java/statusbar/lyric/activity/page/HookPage.kt
+++ b/app/src/main/java/statusbar/lyric/activity/page/HookPage.kt
@@ -17,22 +17,22 @@ class HookPage : BasePage() {
val testModeBinding = GetDataBinding({ ActivityOwnSP.config.testMode }) { view, _, data ->
view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
}
- TextSSw(textId = R.string.TestMode, key = "testMode", onClickListener = { testModeBinding.send(it) })
- TextSSw(textId = R.string.RelaxConditions, tipsId = R.string.RelaxConditionsTips, key = "relaxConditions", dataBindingRecv = testModeBinding.getRecv(1))
- TextSA(textId = R.string.GetHook, onClickListener = {
+ TextSSw(textId = R.string.test_mode, key = "testMode", onClickListener = { testModeBinding.send(it) })
+ TextSSw(textId = R.string.relax_conditions, tipsId = R.string.relax_conditions_tips, key = "relaxConditions", dataBindingRecv = testModeBinding.getRecv(1))
+ TextSA(textId = R.string.get_hook, onClickListener = {
waitResponse()
activity.getClass()
}, dataBindingRecv = testModeBinding.getRecv(1))
Line()
- TextSA(textId = R.string.ResetSystemUi, onClickListener = {
+ TextSA(textId = R.string.reset_system_ui, onClickListener = {
MIUIDialog(activity) {
- setTitle(R.string.ResetSystemUi)
- setMessage(R.string.RestartUITips)
- setLButton(R.string.OK) {
+ setTitle(R.string.reset_system_ui)
+ setMessage(R.string.restart_systemui_tips)
+ setLButton(R.string.ok) {
Tools.shell("pkill -f com.android.systemui", true)
dismiss()
}
- setRButton(R.string.Cancel) { dismiss() }
+ setRButton(R.string.cancel) { dismiss() }
}.show()
})
}
diff --git a/app/src/main/java/statusbar/lyric/activity/page/IconPage.kt b/app/src/main/java/statusbar/lyric/activity/page/IconPage.kt
index 75d0a10d..40b3f548 100644
--- a/app/src/main/java/statusbar/lyric/activity/page/IconPage.kt
+++ b/app/src/main/java/statusbar/lyric/activity/page/IconPage.kt
@@ -18,19 +18,19 @@ class IconPage : BasePage() {
val binding = GetDataBinding({ config.iconSwitch }) { view, _, data ->
view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
}
- TextSSw(textId = R.string.IconSwitch, key = "iconSwitch", defValue = false, onClickListener = {
+ TextSSw(textId = R.string.icon_switch, key = "iconSwitch", defValue = false, onClickListener = {
changeConfig()
binding.send(it)
})
- TextSA(textId = R.string.IconSize, onClickListener = {
+ TextSA(textId = R.string.icon_size, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.IconSize))
- setMessage(getString(R.string.IconSizeTips))
+ setTitle(getString(R.string.icon_size))
+ setMessage(getString(R.string.icon_size_tips))
setEditText(config.iconSize.toString(), "0", config = {
it.inputType = InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf(InputFilter.LengthFilter(3))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in 0..100) {
@@ -40,22 +40,22 @@ class IconPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
}, dataBindingRecv = binding.getRecv(1))
- TextSA(textId = R.string.IconColorAndTransparency, onClickListener = {
+ TextSA(textId = R.string.icon_color_and_transparency, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.IconColorAndTransparency))
- setMessage(getString(R.string.IconColorAndTransparencyTips))
+ setTitle(getString(R.string.icon_color_and_transparency))
+ setMessage(getString(R.string.icon_color_and_transparency_tips))
setEditText(config.iconColor, "#FFFFFF", config = {
it.inputType = InputType.TYPE_CLASS_TEXT
it.filters = arrayOf(InputFilter.LengthFilter(9))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText()
if (value.isEmpty()) {
@@ -66,22 +66,22 @@ class IconPage : BasePage() {
}
changeConfig()
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
}, dataBindingRecv = binding.getRecv(1))
- TextSA(textId = R.string.IconTopMargins, onClickListener = {
+ TextSA(textId = R.string.icon_top_margins, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.IconTopMargins))
- setMessage(getString(R.string.IconTopMarginsTips))
+ setTitle(getString(R.string.icon_top_margins))
+ setMessage(getString(R.string.icon_top_margins_tips))
setEditText(config.iconTopMargins.toString(), "0", config = {
it.inputType = InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf(InputFilter.LengthFilter(4))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in -100..100) {
@@ -91,22 +91,22 @@ class IconPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
}, dataBindingRecv = binding.getRecv(1))
- TextSA(textId = R.string.IconBottomMargins, onClickListener = {
+ TextSA(textId = R.string.icon_bottom_margins, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.IconBottomMargins))
- setMessage(getString(R.string.IconBottomMarginsTips))
+ setTitle(getString(R.string.icon_bottom_margins))
+ setMessage(getString(R.string.icon_bottom_margins_tips))
setEditText(config.iconBottomMargins.toString(), "0", config = {
it.inputType = InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf(InputFilter.LengthFilter(4))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in -100..100) {
@@ -116,22 +116,22 @@ class IconPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
}, dataBindingRecv = binding.getRecv(1))
- TextSA(textId = R.string.IconStartMargins, onClickListener = {
+ TextSA(textId = R.string.icon_start_margins, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.IconStartMargins))
- setMessage(getString(R.string.IconStartMarginsTips))
+ setTitle(getString(R.string.icon_start_margins))
+ setMessage(getString(R.string.icon_start_margins_tips))
setEditText(config.iconStartMargins.toString(), "0", config = {
it.inputType = InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf(InputFilter.LengthFilter(4))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in -500..500) {
@@ -141,13 +141,13 @@ class IconPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
}, dataBindingRecv = binding.getRecv(1))
- TextSSw(textId = R.string.ForceTheIconToBeDisplayed, key = "forceTheIconToBeDisplayed", onClickListener = { changeConfig() }, dataBindingRecv = binding.getRecv(1))
+ TextSSw(textId = R.string.force_the_icon_to_be_displayed, key = "forceTheIconToBeDisplayed", onClickListener = { changeConfig() }, dataBindingRecv = binding.getRecv(1))
}
}
\ No newline at end of file
diff --git a/app/src/main/java/statusbar/lyric/activity/page/LyricPage.kt b/app/src/main/java/statusbar/lyric/activity/page/LyricPage.kt
index 18016b02..adabc7a4 100644
--- a/app/src/main/java/statusbar/lyric/activity/page/LyricPage.kt
+++ b/app/src/main/java/statusbar/lyric/activity/page/LyricPage.kt
@@ -28,14 +28,14 @@ class LyricPage : BasePage() {
seekBar.progress = data as Int
}
}
- TextSA(textId = R.string.LyricWidth, onClickListener = {
+ TextSA(textId = R.string.lyric_width, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricWidth))
- setMessage(getString(R.string.LyricWidthTips))
+ setTitle(getString(R.string.lyric_width))
+ setMessage(getString(R.string.lyric_width_tips))
setEditText(config.lyricWidth.toString(), "0", config = {
it.filters = arrayOf(InputFilter.LengthFilter(3))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in 0..100) {
@@ -46,10 +46,10 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally {
dismiss()
}
@@ -58,16 +58,16 @@ class LyricPage : BasePage() {
SeekBarWithText(key = "lyricWidth", min = 0, max = 100, defaultProgress = 0, dataBindingRecv = widthBinding.getRecv(2), dataBindingSend = widthBinding.bindingSend, callBacks = { _, _ ->
changeConfig()
})
- TextSSw(textId = R.string.FixedLyricWidth, tipsId = R.string.fixedLyricWidthTips, key = "fixedLyricWidth", onClickListener = { changeConfig() }, dataBindingRecv = widthBinding.getRecv(1))
- TextSA(textId = R.string.LyricSize, onClickListener = {
+ TextSSw(textId = R.string.fixed_lyric_width, tipsId = R.string.fixed_lyric_width_tips, key = "fixedLyricWidth", onClickListener = { changeConfig() }, dataBindingRecv = widthBinding.getRecv(1))
+ TextSA(textId = R.string.lyric_size, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricSize))
- setMessage(getString(R.string.LyricSizeTips))
+ setTitle(getString(R.string.lyric_size))
+ setMessage(getString(R.string.lyric_size_tips))
setEditText(config.lyricSize.toString(), "0", config = {
it.inputType = InputType.TYPE_CLASS_NUMBER
it.filters = arrayOf(InputFilter.LengthFilter(3))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in 0..100) {
@@ -77,22 +77,22 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.LyricColorAndTransparency, onClickListener = {
+ TextSA(textId = R.string.lyric_color_and_transparency, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricColorAndTransparency))
- setMessage(getString(R.string.LyricColorAndTransparencyTips))
+ setTitle(getString(R.string.lyric_color_and_transparency))
+ setMessage(getString(R.string.lyric_color_and_transparency_tips))
setEditText(config.lyricColor, "#FFFFFF", config = {
it.inputType = InputType.TYPE_CLASS_TEXT
it.filters = arrayOf(InputFilter.LengthFilter(9))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText()
if (value.isEmpty()) {
@@ -103,44 +103,44 @@ class LyricPage : BasePage() {
}
changeConfig()
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.LyricBackgroundColorAndTransparency, onClickListener = {
+ TextSA(textId = R.string.lyric_background_color_and_transparency, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricBackgroundColorAndTransparency))
- setMessage(getString(R.string.LyricBackgroundColorAndTransparencyTips))
+ setTitle(getString(R.string.lyric_background_color_and_transparency))
+ setMessage(getString(R.string.lyric_background_color_and_transparency_tips))
setEditText(config.lyricBackgroundColor, "#00000000", config = {
it.inputType = InputType.TYPE_CLASS_TEXT
it.filters = arrayOf(InputFilter.LengthFilter(9))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText()
Color.parseColor(value)
config.lyricBackgroundColor = value
changeConfig()
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.LyricBackgroundRadius, onClickListener = {
+ TextSA(textId = R.string.lyric_background_radius, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricBackgroundRadius))
- setMessage(getString(R.string.LyricBackgroundRadiusTips))
+ setTitle(getString(R.string.lyric_background_radius))
+ setMessage(getString(R.string.lyric_background_radius_tips))
setEditText(config.lyricBackgroundRadius.toString(), "0", config = {
it.inputType = InputType.TYPE_CLASS_NUMBER
it.filters = arrayOf(InputFilter.LengthFilter(3))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in 0..100) {
@@ -150,22 +150,22 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.LyricLetterSpacing, onClickListener = {
+ TextSA(textId = R.string.lyric_letter_spacing, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricLetterSpacing))
- setMessage(getString(R.string.LyricLetterSpacingTips))
+ setTitle(getString(R.string.lyric_letter_spacing))
+ setMessage(getString(R.string.lyric_letter_spacing_tips))
setEditText(config.lyricLetterSpacing.toString(), "0", config = {
it.inputType = InputType.TYPE_CLASS_NUMBER
it.filters = arrayOf(InputFilter.LengthFilter(3))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in 0..50) {
@@ -175,22 +175,22 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.LyricStrokeWidth, onClickListener = {
+ TextSA(textId = R.string.lyric_stroke_width, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricStrokeWidth))
- setMessage(getString(R.string.LyricStrokeWidthTips))
+ setTitle(getString(R.string.lyric_stroke_width))
+ setMessage(getString(R.string.lyric_stroke_width_tips))
setEditText(config.lyricStrokeWidth.toString(), "130", config = {
it.inputType = InputType.TYPE_CLASS_NUMBER
it.filters = arrayOf(InputFilter.LengthFilter(3))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in 0..400) {
@@ -200,22 +200,22 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.LyricSpeed, onClickListener = {
+ TextSA(textId = R.string.lyric_speed, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricSpeed))
- setMessage(getString(R.string.LyricSpeedTips))
+ setTitle(getString(R.string.lyric_speed))
+ setMessage(getString(R.string.lyric_speed_tips))
setEditText(config.lyricSpeed.toString(), "4", config = {
it.inputType = InputType.TYPE_CLASS_NUMBER
it.filters = arrayOf(InputFilter.LengthFilter(2))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in 0..10) {
@@ -225,47 +225,22 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSSw(textId = R.string.LyricBlurredEdges, key = "lyricBlurredEdges", defValue = false)
- TextSA(textId = R.string.LyricBlurredEdgesRadius, onClickListener = {
+ TextSA(textId = R.string.lyric_top_margins, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricBlurredEdgesRadius))
- setMessage(getString(R.string.LyricBlurredEdgesRadiusTips))
- setEditText(config.lyricBlurredEdgesRadius.toString(), "40", config = {
- it.inputType = InputType.TYPE_CLASS_NUMBER
- it.filters = arrayOf(InputFilter.LengthFilter(3))
- })
- setRButton(getString(R.string.OK)) {
- try {
- val value = getEditText().toInt()
- if (value in 0..100) {
- config.lyricBlurredEdgesRadius = value
- } else {
- throw Exception()
- }
- } catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
- }
- }
- setLButton(getString(R.string.Cancel))
- finally { dismiss() }
- }.show()
- })
- TextSA(textId = R.string.LyricTopMargins, onClickListener = {
- MIUIDialog(activity) {
- setTitle(getString(R.string.LyricTopMargins))
- setMessage(getString(R.string.LyricTopMarginsTips))
+ setTitle(getString(R.string.lyric_top_margins))
+ setMessage(getString(R.string.lyric_top_margins_tips))
setEditText(config.lyricTopMargins.toString(), "0", config = {
it.inputType = InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf(InputFilter.LengthFilter(4))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in -100..100) {
@@ -275,22 +250,22 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.LyricBottomMargins, onClickListener = {
+ TextSA(textId = R.string.lyric_bottom_margins, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricBottomMargins))
- setMessage(getString(R.string.LyricBottomMarginsTips))
+ setTitle(getString(R.string.lyric_bottom_margins))
+ setMessage(getString(R.string.lyric_bottom_margins_tips))
setEditText(config.lyricBottomMargins.toString(), "0", config = {
it.inputType = InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf(InputFilter.LengthFilter(4))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in -100..100) {
@@ -300,22 +275,22 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.LyricStartMargins, onClickListener = {
+ TextSA(textId = R.string.lyric_start_margins, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricStartMargins))
- setMessage(getString(R.string.LyricStartMarginsTips))
+ setTitle(getString(R.string.lyric_start_margins))
+ setMessage(getString(R.string.lyric_start_margins_tips))
setEditText(config.lyricStartMargins.toString(), "7", config = {
it.inputType = InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf(InputFilter.LengthFilter(4))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in -500..500) {
@@ -325,22 +300,22 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.LyricEndMargins, onClickListener = {
+ TextSA(textId = R.string.lyric_end_margins, onClickListener = {
MIUIDialog(activity) {
- setTitle(getString(R.string.LyricEndMargins))
- setMessage(getString(R.string.LyricEndMarginsTips))
+ setTitle(getString(R.string.lyric_end_margins))
+ setMessage(getString(R.string.lyric_end_margins_tips))
setEditText(config.lyricEndMargins.toString(), "0", config = {
it.inputType = InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf(InputFilter.LengthFilter(4))
})
- setRButton(getString(R.string.OK)) {
+ setRButton(getString(R.string.ok)) {
try {
val value = getEditText().toInt()
if (value in -500..500) {
@@ -350,43 +325,28 @@ class LyricPage : BasePage() {
throw Exception()
}
} catch (_: Exception) {
- ActivityTools.showToastOnLooper(getString(R.string.InputError))
+ ActivityTools.showToastOnLooper(getString(R.string.input_error))
}
}
- setLButton(getString(R.string.Cancel))
- finally { dismiss() }
- }.show()
- })
- TextSA(textId = R.string.RegexReplace, onClickListener = {
- MIUIDialog(activity) {
- setTitle(getString(R.string.RegexReplace))
- setMessage(getString(R.string.RegexReplaceTips))
- setEditText(config.regexReplace, "", config = {
- it.inputType = InputType.TYPE_CLASS_TEXT
- it.filters = arrayOf(InputFilter.LengthFilter(100))
- })
- setRButton(getString(R.string.OK)) {
- config.regexReplace = getEditText()
- }
- setLButton(getString(R.string.Cancel))
+ setLButton(getString(R.string.cancel))
finally { dismiss() }
}.show()
})
- TextSw(textId = R.string.HideTime, key = "hideTime", defValue = true, onClickListener = {
+ TextSw(textId = R.string.hide_time, key = "hideTime", defValue = true, onClickListener = {
changeConfig()
})
val animationMaps: LinkedHashMap = LinkedHashMap().apply {
- this["None"] = getString(R.string.LyricsAnimationNone)
- this["Top"] = getString(R.string.LyricsAnimationTop)
- this["Bottom"] = getString(R.string.LyricsAnimationBottom)
- this["Start"] = getString(R.string.LyricsAnimationStart)
- this["End"] = getString(R.string.LyricsAnimationEnd)
- this["ScaleX"] = "ScaleX"
- this["ScaleY"] = "ScaleY"
- this["ScaleXY"] = getString(R.string.LyricsAnimationScaleXY)
- this["Random"] = getString(R.string.LyricsAnimationRandom)
+ this["None"] = getString(R.string.lyrics_animation_none)
+ this["Top"] = getString(R.string.lyrics_animation_top)
+ 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["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)
+ this["Random"] = getString(R.string.lyrics_animation_random)
}
- TextSSp(textId = R.string.LyricsAnimation, currentValue = config.animation, data = {
+ TextSSp(textId = R.string.lyrics_animation, currentValue = animationMaps[config.animation].toString(), data = {
animationMaps.forEach {
add(it.value) {
config.animation = (it.key)
diff --git a/app/src/main/java/statusbar/lyric/activity/page/MainPage.kt b/app/src/main/java/statusbar/lyric/activity/page/MainPage.kt
index d027119b..26ff4b5a 100644
--- a/app/src/main/java/statusbar/lyric/activity/page/MainPage.kt
+++ b/app/src/main/java/statusbar/lyric/activity/page/MainPage.kt
@@ -18,26 +18,28 @@ class MainPage : BasePage() {
val masterSwitchBinding = GetDataBinding({ ActivityOwnSP.config.masterSwitch }) { view, _, data ->
view.visibility = if (data as Boolean) View.VISIBLE else View.GONE
}
- TextSSw(textId = R.string.masterSwitch, key = "masterSwitch", onClickListener = { masterSwitchBinding.send(it) })
+ TextSSw(textId = R.string.master_switch, key = "masterSwitch", onClickListener = { masterSwitchBinding.send(it) })
Line(dataBindingRecv = masterSwitchBinding.getRecv(1))
- TextSA(textId = R.string.HookPage, onClickListener = { showPage(HookPage::class.java) }, dataBindingRecv = masterSwitchBinding.getRecv(1))
- TextSA(textId = R.string.LyricPage, onClickListener = { showPage(LyricPage::class.java) }, dataBindingRecv = masterSwitchBinding.getRecv(1))
- TextSA(textId = R.string.IconPage, onClickListener = { showPage(IconPage::class.java) }, dataBindingRecv = masterSwitchBinding.getRecv(1))
+ TextSA(textId = R.string.hook_page, onClickListener = { showPage(HookPage::class.java) }, dataBindingRecv = masterSwitchBinding.getRecv(1))
+ TextSA(textId = R.string.lyric_page, onClickListener = { showPage(LyricPage::class.java) }, dataBindingRecv = masterSwitchBinding.getRecv(1))
+ TextSA(textId = R.string.icon_page, onClickListener = { showPage(IconPage::class.java) }, dataBindingRecv = masterSwitchBinding.getRecv(1))
Line(dataBindingRecv = masterSwitchBinding.getRecv(1))
- TextSA(textId = R.string.ExtendPage, onClickListener = { showPage(ExtendPage::class.java) }, dataBindingRecv = masterSwitchBinding.getRecv(1))
- TitleText(textId = R.string.Tips1)
+ TextSA(textId = R.string.extend_page, onClickListener = { showPage(ExtendPage::class.java) }, dataBindingRecv = masterSwitchBinding.getRecv(1))
+ TextSA(textId = R.string.system_special_page, onClickListener = { showPage(SystemSpecialPage::class.java) }, dataBindingRecv = masterSwitchBinding.getRecv(1))
+ TitleText(textId = R.string.tips1)
}
private fun checkApi() {
val openLyricGetter = { ActivityTools.openUrl("https://github.com/xiaowine/Lyric-Getter/") }
ActivityTools.checkInstalled("cn.lyric.getter").isNotNull {
- if (it.metaData.getInt("Getter_Version") != BuildConfig.API_VERSION) {
- TextSA(textId = R.string.NoSupportedVersionLyricGetter, tipsId = R.string.clickToInstall, onClickListener = {
+ val getterVersion = it.metaData.getInt("Getter_Version")
+ if (getterVersion != BuildConfig.API_VERSION) {
+ TextSA(text = "${getString(R.string.no_supported_version_lyric_getter)}\nLyric Getter Api Version:${getterVersion}", tipsId = R.string.click_to_install, onClickListener = {
openLyricGetter()
})
}
}.isNot {
- TextSA(textId = R.string.NoLyricGetter, tipsId = R.string.clickToInstall, onClickListener = {
+ TextSA(textId = R.string.no_lyric_getter, tipsId = R.string.click_to_install, onClickListener = {
openLyricGetter()
})
}
diff --git a/app/src/main/java/statusbar/lyric/activity/page/MenuPage.kt b/app/src/main/java/statusbar/lyric/activity/page/MenuPage.kt
index 84f95f8d..edbdc9a0 100644
--- a/app/src/main/java/statusbar/lyric/activity/page/MenuPage.kt
+++ b/app/src/main/java/statusbar/lyric/activity/page/MenuPage.kt
@@ -20,51 +20,51 @@ import java.util.Locale
@BMMenuPage
class MenuPage : BasePage() {
override fun onCreate() {
- TextWithSwitch(TextV(textId = R.string.HideDeskIcon), SwitchV("hLauncherIcon", onClickListener = {
+ TextWithSwitch(TextV(textId = R.string.hide_desk_icon), SwitchV("hLauncherIcon", onClickListener = {
activity.packageManager.setComponentEnabledSetting(ComponentName(activity, "${BuildConfig.APPLICATION_ID}.launcher"), if (it) {
PackageManager.COMPONENT_ENABLED_STATE_DISABLED
} else {
PackageManager.COMPONENT_ENABLED_STATE_ENABLED
}, PackageManager.DONT_KILL_APP)
}))
- TextSw(textId = R.string.CheckUpdate, key = "checkUpdate", defValue = true)
- TextSA(textId = R.string.ResetConfig, onClickListener = {
+ TextSw(textId = R.string.check_update, key = "checkUpdate", defValue = true)
+ TextSA(textId = R.string.reset_config, onClickListener = {
MIUIDialog(activity) {
- setTitle(R.string.ResetConfig)
- setLButton(R.string.OK) {
+ setTitle(R.string.reset_config)
+ setLButton(R.string.ok) {
ActivityOwnSP.config.clear()
ActivityTools.changeConfig()
MIUIDialog(activity) {
- setTitle(getString(R.string.RestartAppEffect))
- setRButton(getString(R.string.OK)) {
+ setTitle(getString(R.string.restart_app_effect))
+ setRButton(getString(R.string.ok)) {
ActivityTools.restartApp()
}
setCancelable(false)
}.show()
}
- setRButton(R.string.Cancel)
+ setRButton(R.string.cancel)
finally { dismiss() }
}.show()
})
- TextSA(textId = R.string.ResetSystemUi, onClickListener = {
+ TextSA(textId = R.string.reset_system_ui, onClickListener = {
MIUIDialog(activity) {
- setTitle(R.string.ResetSystemUi)
- setMessage(R.string.RestartUITips)
- setLButton(R.string.OK) {
+ setTitle(R.string.reset_system_ui)
+ setMessage(R.string.restart_systemui_tips)
+ setLButton(R.string.ok) {
Tools.shell("pkill -f com.android.systemui", true)
dismiss()
}
- setRButton(R.string.Cancel) { dismiss() }
+ setRButton(R.string.cancel) { dismiss() }
}.show()
})
- TextSA(textId = R.string.BackupConfig, onClickListener = { activity.getSP()?.let { BackupTools.backup(activity, it) } })
- TextSA(textId = R.string.RecoveryConfig, onClickListener = { activity.getSP()?.let { BackupTools.recovery(activity, it) } })
+ TextSA(textId = R.string.backup_config, onClickListener = { activity.getSP()?.let { BackupTools.backup(activity, it) } })
+ TextSA(textId = R.string.recovery_config, onClickListener = { activity.getSP()?.let { BackupTools.recovery(activity, it) } })
Line()
- TitleText(textId = R.string.ModuleVersion)
- TextSA(textId = R.string.ModuleVersion, tips = "${BuildConfig.VERSION_NAME}(${BuildConfig.VERSION_CODE})-${BuildConfig.BUILD_TYPE}")
+ TitleText(textId = R.string.module_version)
+ TextSA(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.ModuleBuildTime, tips = buildTime)
+ TextSA(textId = R.string.module_build_time, tips = buildTime)
Text()
}
}
\ No newline at end of file
diff --git a/app/src/main/java/statusbar/lyric/activity/page/SystemSpecialPage.kt b/app/src/main/java/statusbar/lyric/activity/page/SystemSpecialPage.kt
new file mode 100644
index 00000000..5521edc4
--- /dev/null
+++ b/app/src/main/java/statusbar/lyric/activity/page/SystemSpecialPage.kt
@@ -0,0 +1,17 @@
+package statusbar.lyric.activity.page
+
+import cn.fkj233.ui.activity.annotation.BMPage
+import cn.fkj233.ui.activity.data.BasePage
+import statusbar.lyric.R
+import statusbar.lyric.tools.Tools.isMIUI
+
+@BMPage
+class SystemSpecialPage : BasePage() {
+ override fun onCreate() {
+ if (isMIUI) {
+ TextSw(textId = R.string.miui_hide_network_speed, key = "mMIUIHideNetworkSpeed")
+ }
+ Line()
+ TitleText("Wait for More...")
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/statusbar/lyric/config/Config.kt b/app/src/main/java/statusbar/lyric/config/Config.kt
index 2343371c..8c5ec94d 100644
--- a/app/src/main/java/statusbar/lyric/config/Config.kt
+++ b/app/src/main/java/statusbar/lyric/config/Config.kt
@@ -250,6 +250,13 @@ class Config {
set(value) {
config.put("lyricBlurredEdgesRadius", value)
}
+ var lyricBlurredEdgesType: Int
+ get() {
+ return config.opt("lyricBlurredEdgesType", 0)
+ }
+ set(value) {
+ config.put("lyricBlurredEdgesType", value)
+ }
var lyricSpeed: Int
get() {
@@ -331,7 +338,42 @@ class Config {
set(value) {
config.put("dynamicLyricSpeed", value)
}
+ var clickStatusBarToHideLyric: Boolean
+ get() {
+ return config.opt("clickStatusBarToHideLyric", false)
+ }
+ set(value) {
+ config.put("clickStatusBarToHideLyric", value)
+ }
+ var mMIUIHideNetworkSpeed: Boolean
+ get() {
+ return config.opt("mMIUIHideNetworkSpeed", false)
+ }
+ set(value) {
+ config.put("mMIUIHideNetworkSpeed", value)
+ }
+ var slideStatusBarCutSongs: Boolean
+ get() {
+ return config.opt("slideStatusBarCutSongs", false)
+ }
+ set(value) {
+ config.put("slideStatusBarCutSongs", value)
+ }
+ var slideStatusBarCutSongsXRadius: Int
+ get() {
+ return config.opt("slideStatusBarCutSongsXRadius", 150)
+ }
+ set(value) {
+ config.put("slideStatusBarCutSongsXRadius", value)
+ }
+ var slideStatusBarCutSongsYRadius: Int
+ get() {
+ return config.opt("slideStatusBarCutSongsYRadius", 25)
+ }
+ set(value) {
+ config.put("slideStatusBarCutSongsYRadius", value)
+ }
private val defIconHashMap by lazy {
HashMap().apply {
this["com.tencent.qqmusic"] = qQMusicIcon
diff --git a/app/src/main/java/statusbar/lyric/hook/BaseHook.kt b/app/src/main/java/statusbar/lyric/hook/BaseHook.kt
index 5a8f80ea..480afedf 100644
--- a/app/src/main/java/statusbar/lyric/hook/BaseHook.kt
+++ b/app/src/main/java/statusbar/lyric/hook/BaseHook.kt
@@ -2,6 +2,5 @@ package statusbar.lyric.hook
abstract class BaseHook {
var isInit: Boolean = false
- abstract val name: String
abstract fun init()
}
\ No newline at end of file
diff --git a/app/src/main/java/statusbar/lyric/hook/MainHook.kt b/app/src/main/java/statusbar/lyric/hook/MainHook.kt
index 0788635c..32493f29 100644
--- a/app/src/main/java/statusbar/lyric/hook/MainHook.kt
+++ b/app/src/main/java/statusbar/lyric/hook/MainHook.kt
@@ -16,7 +16,7 @@ import java.util.Locale
class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
if (!XposedOwnSP.config.masterSwitch) {
- moduleRes.getString(R.string.MasterOff).log()
+ moduleRes.getString(R.string.master_off).log()
return
}
@@ -25,10 +25,10 @@ class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit {
"com.android.systemui" -> {
"${BuildConfig.APPLICATION_ID} - ${BuildConfig.VERSION_NAME}(${BuildConfig.VERSION_CODE}[${Locale.getDefault().language}] *${BuildConfig.BUILD_TYPE})".log()
if (XposedOwnSP.config.testMode) {
- moduleRes.getString(R.string.HookPage).log()
+ moduleRes.getString(R.string.hook_page).log()
initHooks(SystemUITest())
} else {
- moduleRes.getString(R.string.LyricMode).log()
+ moduleRes.getString(R.string.lyric_mode).log()
initHooks(SystemUILyric())
}
}
@@ -38,7 +38,7 @@ class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit {
override fun initZygote(startupParam: IXposedHookZygoteInit.StartupParam) {
EzXHelper.initZygote(startupParam)
if (!XposedOwnSP.config.masterSwitch) {
- moduleRes.getString(R.string.MasterOff).log()
+ moduleRes.getString(R.string.master_off).log()
return
}
}
@@ -49,9 +49,9 @@ class MainHook : IXposedHookLoadPackage, IXposedHookZygoteInit {
if (it.isInit) return
it.init()
it.isInit = true
- "${moduleRes.getString(R.string.HookSucceeded)}:${it.javaClass.simpleName}".log()
+ "${moduleRes.getString(R.string.hook_succeeded)}:${it.javaClass.simpleName}".log()
} catch (e: Exception) {
- "${moduleRes.getString(R.string.HookFailed)}:${it.javaClass.simpleName}".log()
+ "${moduleRes.getString(R.string.hook_failed)}:${it.javaClass.simpleName}".log()
e.log()
}
}
diff --git a/app/src/main/java/statusbar/lyric/hook/app/SystemUILyric.kt b/app/src/main/java/statusbar/lyric/hook/app/SystemUILyric.kt
index 4e4edce5..56370a75 100644
--- a/app/src/main/java/statusbar/lyric/hook/app/SystemUILyric.kt
+++ b/app/src/main/java/statusbar/lyric/hook/app/SystemUILyric.kt
@@ -29,28 +29,34 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
+import android.content.res.Configuration
import android.graphics.Color
import android.graphics.Paint
+import android.graphics.Point
import android.graphics.Typeface
import android.graphics.drawable.GradientDrawable
import android.os.Build
+import android.os.PowerManager
import android.util.DisplayMetrics
import android.util.TypedValue
import android.view.Gravity
+import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
-import android.widget.RelativeLayout
import android.widget.TextView
+import android.widget.Toast
+import cn.lyric.getter.api.LyricListener
import cn.lyric.getter.api.data.DataType
import cn.lyric.getter.api.data.LyricData
import cn.lyric.getter.api.tools.Tools.base64ToDrawable
-import cn.lyric.getter.api.tools.Tools.receptionLyric
+import cn.lyric.getter.api.tools.Tools.registerLyricListener
import com.github.kyuubiran.ezxhelper.ClassUtils.loadClassOrNull
import com.github.kyuubiran.ezxhelper.EzXHelper.moduleRes
import com.github.kyuubiran.ezxhelper.HookFactory.`-Static`.createHook
import com.github.kyuubiran.ezxhelper.ObjectHelper.Companion.objectHelper
+import com.github.kyuubiran.ezxhelper.finders.ConstructorFinder.`-Static`.constructorFinder
import com.github.kyuubiran.ezxhelper.finders.MethodFinder.`-Static`.methodFinder
import de.robv.android.xposed.XC_MethodHook
import statusbar.lyric.BuildConfig
@@ -60,10 +66,14 @@ import statusbar.lyric.hook.BaseHook
import statusbar.lyric.tools.LogTools.log
import statusbar.lyric.tools.Tools.goMainThread
import statusbar.lyric.tools.Tools.isLandscape
+import statusbar.lyric.tools.Tools.isMIUI
import statusbar.lyric.tools.Tools.isNot
import statusbar.lyric.tools.Tools.isNotNull
import statusbar.lyric.tools.Tools.isTargetView
+import statusbar.lyric.tools.Tools.observableChange
import statusbar.lyric.tools.Tools.regexReplace
+import statusbar.lyric.tools.Tools.shell
+import statusbar.lyric.tools.Tools.togglePrompts
import statusbar.lyric.tools.ViewTools
import statusbar.lyric.tools.ViewTools.hideView
import statusbar.lyric.tools.ViewTools.iconColorAnima
@@ -72,19 +82,54 @@ import statusbar.lyric.tools.ViewTools.textColorAnima
import statusbar.lyric.view.EdgeTransparentView
import statusbar.lyric.view.LyricSwitchView
import java.io.File
+import java.math.BigDecimal
+import java.math.RoundingMode
+import kotlin.math.abs
import kotlin.math.min
import kotlin.math.roundToInt
class SystemUILyric : BaseHook() {
-
private var isScreenLock: Boolean = false
private lateinit var hook: XC_MethodHook.Unhook
- private var lastColor: Int = 0
+ private var lastColor: Int by observableChange(Color.WHITE) { _, newValue ->
+ goMainThread {
+ if (config.lyricColor.isEmpty()) lyricView.textColorAnima(newValue)
+ if (config.iconColor.isEmpty()) iconView.iconColorAnima(lastColor, newValue)
+ }
+ "Change Color".log()
+ }
private var lastLyric: String = ""
- private var lastBase64Icon: String = ""
+ private var lastBase64Icon: String by observableChange("") { _, newValue ->
+ goMainThread {
+ base64ToDrawable(newValue).isNotNull {
+ iconView.showView()
+ iconView.setImageBitmap(it)
+ }.isNot {
+ iconView.hideView()
+ }
+ "Change Icon".log()
+ }
+ }
private var iconSwitch: Boolean = true
- private var isShow: Boolean = false
+ private var isPlaying: Boolean = false
+ private var isHiding: Boolean = false
+ private var isMove = false
+ private var themeMode: Int by observableChange(0) { oldValue, _ ->
+ if (oldValue == 0) return@observableChange
+ "onConfigurationChanged".log()
+ runCatching {
+ val pm = context.getSystemService(Context.POWER_SERVICE) as PowerManager
+ if (!pm.isInteractive) {
+ shell("pkill -f com.android.systemui", false)
+ } else {
+ Toast.makeText(context, moduleRes.getString(R.string.configuration_changed_tips), Toast.LENGTH_LONG).show()
+ }
+ }
+ }
+ private var theoreticalWidth: Int = 0
+ private lateinit var point: Point
+
val context: Context by lazy { AndroidAppHelper.currentApplication() }
private val displayMetrics: DisplayMetrics by lazy { context.resources.displayMetrics }
@@ -106,7 +151,11 @@ class SystemUILyric : BaseHook() {
}
}
- private val iconView: ImageView by lazy { ImageView(context) }
+ private val iconView: ImageView by lazy {
+ ImageView(context).apply {
+ visibility = View.GONE
+ }
+ }
private val lyricLayout: LinearLayout by lazy {
LinearLayout(context).apply {
orientation = LinearLayout.HORIZONTAL
@@ -124,6 +173,7 @@ class SystemUILyric : BaseHook() {
}
}
+ private lateinit var mMIUINetworkSpeedView: TextView
//////////////////////////////Hook//////////////////////////////////////
@SuppressLint("DiscouragedApi")
@@ -132,9 +182,10 @@ class SystemUILyric : BaseHook() {
loadClassOrNull(config.textViewClassName).isNotNull {
hook = TextView::class.java.methodFinder().filterByName("setText").first().createHook {
after { hookParam ->
- (hookParam.thisObject as View).isTargetView { view ->
+ val view = (hookParam.thisObject as View)
+ if (view.isTargetView()) {
"Lyric Init".log()
- clockView = view
+ clockView = view as TextView
targetView = (clockView.parent as LinearLayout).apply {
gravity = Gravity.CENTER
}
@@ -143,32 +194,34 @@ class SystemUILyric : BaseHook() {
}
}
}
- if (config.limitVisibilityChange) {
- moduleRes.getString(R.string.LimitVisibilityChange).log()
- View::class.java.methodFinder().filterByName("setVisibility").first().createHook {
- before { hookParam ->
- if (isShow) {
- if (hookParam.args[0] == View.VISIBLE) {
- (hookParam.thisObject as View).isTargetView {
- hookParam.args[0] = View.GONE
- }
+ }.isNot {
+ moduleRes.getString(R.string.load_class_empty).log()
+ return
+ }
+ if (config.limitVisibilityChange) {
+ moduleRes.getString(R.string.limit_visibility_change).log()
+ View::class.java.methodFinder().filterByName("setVisibility").first().createHook {
+ before { hookParam ->
+ if (isPlaying) {
+ if (hookParam.args[0] == View.VISIBLE) {
+ val view = hookParam.thisObject as View
+ if (view.isTargetView() || (this@SystemUILyric::mNotificationIconArea.isInitialized && mNotificationIconArea == view) || (this@SystemUILyric::mCarrierLabel.isInitialized && mCarrierLabel == view) || (this@SystemUILyric::mMIUINetworkSpeedView.isInitialized && mMIUINetworkSpeedView == view)) {
+ hookParam.args[0] = View.GONE
}
}
}
}
}
}
+
+ "${moduleRes.getString(R.string.lyric_color_scheme)}:${moduleRes.getString(R.string.lyric_color_scheme)}".log()
when (config.lyricColorScheme) {
0 -> {
loadClassOrNull("com.android.systemui.statusbar.phone.DarkIconDispatcherImpl").isNotNull {
it.methodFinder().filterByName("applyDarkIntensity").first().createHook {
- after { hookParam ->
- if (!(this@SystemUILyric::clockView.isInitialized && this@SystemUILyric::targetView.isInitialized)) return@after
- hookParam.thisObject.objectHelper {
- val mIconTint = getObjectOrNullAs("mIconTint") ?: Color.BLACK
- changeColor(mIconTint)
- }
-
+ after {
+ if (!isPlaying) return@after
+ lastColor = clockView.currentTextColor
}
}
}
@@ -177,46 +230,116 @@ class SystemUILyric : BaseHook() {
1 -> {
loadClassOrNull("com.android.systemui.statusbar.phone.NotificationIconAreaController").isNotNull {
it.methodFinder().filterByName("onDarkChanged").filterByParamCount(3).first().createHook {
- after { hookParam ->
- if (!(this@SystemUILyric::clockView.isInitialized && this@SystemUILyric::targetView.isInitialized)) return@after
- val isDark = (hookParam.args[1] as Float) == 1f
- changeColor(if (isDark) Color.BLACK else Color.WHITE)
+ after {
+ if (!isPlaying) return@after
+ lastColor = clockView.currentTextColor
}
}
}
}
-
- else -> {}
}
if (config.hideNotificationIcon) {
+ moduleRes.getString(R.string.hide_notification_icon).log()
loadClassOrNull("com.android.systemui.statusbar.phone.NotificationIconAreaController").isNotNull {
- moduleRes.getString(R.string.HideNotificationIcon).log()
it.methodFinder().filterByName("initializeNotificationAreaViews").first().createHook {
after { hookParam ->
- hookParam.thisObject.objectHelper {
- mNotificationIconArea = this.getObjectOrNullAs("mNotificationIconArea")!!
+ val clazz = hookParam.thisObject::class.java
+ if (clazz.simpleName == "NotificationIconAreaController") {
+ hookParam.thisObject.objectHelper {
+ mNotificationIconArea = this.getObjectOrNullAs("mNotificationIconArea")!!
+ }
+ } else {
+ mNotificationIconArea = clazz.superclass.getField("mNotificationIconArea").get(hookParam.thisObject) as View
}
}
}
}
}
if (config.hideCarrier) {
- moduleRes.getString(R.string.HideCarrier).log()
+ moduleRes.getString(R.string.hide_carrier).log()
loadClassOrNull("com.android.systemui.statusbar.phone.KeyguardStatusBarView").isNotNull {
it.methodFinder().filterByName("onFinishInflate").first().createHook {
after { hookParam ->
- val frameLayout = hookParam.thisObject as RelativeLayout
- mCarrierLabel = frameLayout.findViewById(context.resources.getIdentifier("keyguard_carrier_text", "id", context.packageName))
+ val clazz = hookParam.thisObject::class.java
+ if (clazz.simpleName == "KeyguardStatusBarView") {
+ hookParam.thisObject.objectHelper {
+ mCarrierLabel = this.getObjectOrNullAs("mCarrierLabel")!!
+ }
+ } else {
+ mCarrierLabel = clazz.superclass.getField("mCarrierLabel").get(hookParam.thisObject) as TextView
+ }
}
}
}
}
- }
+ if (config.clickStatusBarToHideLyric || config.slideStatusBarCutSongs) {
+ loadClassOrNull("com.android.systemui.statusbar.phone.PhoneStatusBarView").isNotNull {
+ it.methodFinder().filterByName("onTouchEvent").first().createHook {
+ before { hookParam ->
+ val motionEvent = hookParam.args[0] as MotionEvent
+ when (motionEvent.action) {
+ MotionEvent.ACTION_DOWN -> {
+ point = Point(motionEvent.rawX.toInt(), motionEvent.rawY.toInt())
+ }
+
+ MotionEvent.ACTION_MOVE -> {
+ isMove = true
+ }
+ MotionEvent.ACTION_UP -> {
+ if (!isMove) {
+ if (config.clickStatusBarToHideLyric) {
+ if (motionEvent.eventTime - motionEvent.downTime < 200) {
+ moduleRes.getString(R.string.click_status_bar_to_hide_lyric).log()
+ if (isHiding) {
+ isHiding = false
+ changeLyric(lastLyric, 0)
+ hookParam.result = true
+ } else {
+ val x = motionEvent.x.toInt()
+ val y = motionEvent.y.toInt()
+ val left = lyricLayout.left
+ val top = lyricLayout.top
+ val right = lyricLayout.right
+ val bottom = lyricLayout.bottom
+ if (x in left..right && y in top..bottom) {
+ hideLyric()
+ isHiding = true
+ hookParam.result = true
+ }
+ }
+ }
+ }
+ } else {
+ if (config.slideStatusBarCutSongs && isPlaying) {
+ if (abs(point.y - motionEvent.rawY.toInt()) <= config.slideStatusBarCutSongsYRadius) {
+ val i = point.x - motionEvent.rawX.toInt()
+ if (abs(i) > config.slideStatusBarCutSongsXRadius) {
+ moduleRes.getString(R.string.slide_status_bar_cut_songs).log()
+ if (i > 0) {
+ shell("input keyevent 87", false)
+ } else {
+ shell("input keyevent 88", false)
+ }
+ hookParam.result = true
+ }
+ }
+ }
+ isMove = false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ SystemUISpecial()
+ }
@SuppressLint("UnspecifiedRegisterReceiverFlag", "MissingPermission")
private fun lyricInit() {
+ themeMode = (context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK)
goMainThread(1) {
if (config.viewIndex == 0) {
targetView.addView(lyricLayout, 0)
@@ -224,19 +347,27 @@ class SystemUILyric : BaseHook() {
targetView.addView(lyricLayout)
}
}
- receptionLyric(context, BuildConfig.API_VERSION) {
- if (!(this::clockView.isInitialized && this::targetView.isInitialized)) return@receptionLyric
- if (it.type == DataType.UPDATE) {
- val lyric = it.lyric.regexReplace(config.regexReplace, "")
- if (lyric.isNotEmpty()) {
- changeLyric(lyric)
- changeIcon(it)
+ registerLyricListener(context, BuildConfig.API_VERSION, object : LyricListener {
+ override fun onReceived(lyricData: LyricData) {
+ if (!(this@SystemUILyric::clockView.isInitialized && this@SystemUILyric::targetView.isInitialized)) return
+ if (lyricData.type == DataType.UPDATE) {
+ val lyric = lyricData.lyric.regexReplace(config.regexReplace, "")
+ if (lyric.isNotEmpty()) {
+ lastLyric = lyric
+ if (isHiding) return
+ changeIcon(lyricData)
+ changeLyric(lyric, lyricData.delay)
+ }
+ } else if (lyricData.type == DataType.STOP) {
+ if (isHiding) isHiding = false
+ hideLyric()
}
- } else if (it.type == DataType.STOP) {
- hideLyric()
+ lyricData.log()
}
- it.log()
- }
+ })
+
+
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.registerReceiver(UpdateConfig(), IntentFilter("updateConfig"), Context.RECEIVER_EXPORTED)
} else {
@@ -257,33 +388,40 @@ class SystemUILyric : BaseHook() {
changeConfig(1)
}
- private fun changeLyric(lyric: String) {
- if (lastLyric == lyric || isScreenLock) return
- lastLyric = lyric
- isShow = true
+ private fun changeLyric(lyric: String, delay: Int) {
+ if (isHiding || isScreenLock) return
+ isPlaying = true
"lyric:$lyric".log()
goMainThread {
lyricLayout.showView()
if (config.hideTime) clockView.hideView()
- if (this::mNotificationIconArea.isInitialized && config.hideNotificationIcon) mNotificationIconArea.hideView()
- if (this::mCarrierLabel.isInitialized && config.hideCarrier) mCarrierLabel.hideView()
+ if (this::mNotificationIconArea.isInitialized) mNotificationIconArea.hideView()
+ if (this::mCarrierLabel.isInitialized) mCarrierLabel.hideView()
+ if (this::mMIUINetworkSpeedView.isInitialized) mMIUINetworkSpeedView.hideView()
lyricView.apply {
if (config.animation == "Random") {
- val effect = arrayListOf("Top", "Bottom", "Start", "End").random()
+ val effect = arrayListOf("Top", "Bottom", "Start", "End", "ScaleXY", "ScaleX", "ScaleY").random()
inAnimation = ViewTools.switchViewInAnima(effect)
outAnimation = ViewTools.switchViewOutAnima(effect)
}
width = getLyricWidth(paint, lyric)
- if (config.dynamicLyricSpeed) {
- val theoreticalWidth = min(paint.measureText(lyric).toInt(), targetView.width)
- val i = theoreticalWidth - width
+ if (config.dynamicLyricSpeed && delay == 0) {
+ val i = width - theoreticalWidth
if (i > 0) {
val proportion = i * 1.0 / displayWidth
- val speed = 15 * proportion + 0.5
- speed.log()
+ "proportion:$proportion".log()
+ val speed = 15 * proportion + 0.7
+ "speed:$speed".log()
setSpeed(speed.toFloat())
}
}
+ if (delay > 0) {
+ val i = width - theoreticalWidth
+ if (i > 0) {
+ val speed = BigDecimal(i * 1.0 / 211).setScale(2, RoundingMode.HALF_UP).toFloat()
+ setSpeed(speed)
+ }
+ }
setText(lyric)
}
}
@@ -292,49 +430,25 @@ class SystemUILyric : BaseHook() {
private fun changeIcon(it: LyricData) {
if (!iconSwitch) return
val customIcon = it.customIcon && it.base64Icon.isNotEmpty()
- goMainThread {
- val bitmap = if (customIcon) {
- if (it.base64Icon == lastBase64Icon) return@goMainThread
- lastBase64Icon = it.base64Icon
- base64ToDrawable(it.base64Icon)
- } else {
- val baseIcon = config.getDefaultIcon(it.packageName)
- if (baseIcon == lastBase64Icon) return@goMainThread
- lastBase64Icon = baseIcon
- val base64ToDrawable = base64ToDrawable(baseIcon)
- base64ToDrawable
- }
- bitmap.isNotNull {
- iconView.showView()
- iconView.setImageBitmap(it)
- }.isNot {
- iconView.hideView()
- }
- "Change Icon".log()
+ lastBase64Icon = if (customIcon) {
+ it.base64Icon
+ } else {
+ config.getDefaultIcon(it.packageName)
}
}
private fun hideLyric() {
- isShow = false
+ isPlaying = false
"Hide Lyric".log()
goMainThread {
lyricLayout.hideView()
clockView.showView()
if (this::mNotificationIconArea.isInitialized) mNotificationIconArea.showView()
if (this::mCarrierLabel.isInitialized) mCarrierLabel.showView()
+ if (this::mMIUINetworkSpeedView.isInitialized) mMIUINetworkSpeedView.showView()
}
}
- private fun changeColor(color: Int) {
- "Change Color".log()
- if (lastColor == color) return
- goMainThread {
- if (config.lyricColor.isEmpty()) lyricView.textColorAnima(color)
- if (config.iconColor.isEmpty()) iconView.iconColorAnima(lastColor, color)
- }
- lastColor = color
- }
-
private fun changeConfig(delay: Long = 0L) {
"Change Config".log()
config.update()
@@ -401,7 +515,8 @@ class SystemUILyric : BaseHook() {
private fun getLyricWidth(paint: Paint, text: String): Int {
"Get Lyric Width".log()
return if (config.lyricWidth == 0) {
- min(paint.measureText(text).toInt(), targetView.width)
+ theoreticalWidth = min(paint.measureText(text).toInt(), targetView.width)
+ theoreticalWidth
} else {
if (config.fixedLyricWidth) {
scaleWidth()
@@ -420,8 +535,38 @@ class SystemUILyric : BaseHook() {
}).roundToInt()
}
- override val name: String get() = this::class.java.simpleName
+ inner class SystemUISpecial {
+ init {
+ if (togglePrompts) {
+ loadClassOrNull("com.android.systemui.SystemUIApplication").isNotNull {
+ it.methodFinder().filterByName("onConfigurationChanged").first().createHook {
+ after { hookParam ->
+ val newConfig = hookParam.args[0] as Configuration
+ themeMode = newConfig.uiMode and Configuration.UI_MODE_NIGHT_MASK
+ }
+ }
+ }
+ }
+ if (isMIUI && config.mMIUIHideNetworkSpeed) {
+ moduleRes.getString(R.string.miui_hide_network_speed).log()
+ loadClassOrNull("com.android.systemui.statusbar.views.NetworkSpeedView").isNotNull {
+ it.constructorFinder().first().createHook {
+ after { hookParam ->
+ mMIUINetworkSpeedView = hookParam.thisObject as TextView
+ }
+ }
+ it.methodFinder().filterByName("setVisibilityByController").first().createHook {
+ before { hookParam ->
+ if (isPlaying) {
+ hookParam.args[0] = false
+ }
+ }
+ }
+ }
+ }
+ }
+ }
inner class UpdateConfig : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
diff --git a/app/src/main/java/statusbar/lyric/hook/app/SystemUITest.kt b/app/src/main/java/statusbar/lyric/hook/app/SystemUITest.kt
index d98ac701..684cc154 100644
--- a/app/src/main/java/statusbar/lyric/hook/app/SystemUITest.kt
+++ b/app/src/main/java/statusbar/lyric/hook/app/SystemUITest.kt
@@ -60,7 +60,7 @@ class SystemUITest : BaseHook() {
lateinit var lastView: TextView
val testView by lazy {
TextView(context).apply {
- text = moduleRes.getString(R.string.AppName)
+ text = moduleRes.getString(R.string.app_name)
isSingleLine = true
gravity = Gravity.CENTER
setBackgroundColor(Color.WHITE)
@@ -69,7 +69,6 @@ class SystemUITest : BaseHook() {
}
private val dataHashMap by lazy { HashMap() }
- override val name: String get() = this::class.java.simpleName
@SuppressLint("UnspecifiedRegisterReceiverFlag")
override fun init() {
@@ -84,7 +83,7 @@ class SystemUITest : BaseHook() {
} else {
context.registerReceiver(TestReceiver(), IntentFilter("TestReceiver"))
}
- moduleRes.getString(R.string.StartHookingTextView).log()
+ moduleRes.getString(R.string.start_hooking_text_view).log()
hook()
}
@@ -114,7 +113,7 @@ class SystemUITest : BaseHook() {
Data(className, view.id, parentView::class.java.name, parentView.id, index != 0, index)
}
dataHashMap[view] = data
- moduleRes.getString(R.string.FirstFilter).format(data, dataHashMap.size).log()
+ moduleRes.getString(R.string.first_filter).format(data, dataHashMap.size).log()
}
}
}
@@ -171,11 +170,11 @@ class SystemUITest : BaseHook() {
when (intent.getStringExtra("Type")) {
"GetClass" -> {
if (dataHashMap.size == 0) {
- moduleRes.getString(R.string.NoTextView).log()
+ moduleRes.getString(R.string.no_text_view).log()
context.receiveClass(arrayListOf())
return
} else {
- moduleRes.getString(R.string.SendTextViewClass).format(dataHashMap).log()
+ moduleRes.getString(R.string.send_text_view_class).format(dataHashMap).log()
context.receiveClass(ArrayList(dataHashMap.values))
}
}
diff --git a/app/src/main/java/statusbar/lyric/tools/ActivityTestTools.kt b/app/src/main/java/statusbar/lyric/tools/ActivityTestTools.kt
index 29328d29..49652540 100644
--- a/app/src/main/java/statusbar/lyric/tools/ActivityTestTools.kt
+++ b/app/src/main/java/statusbar/lyric/tools/ActivityTestTools.kt
@@ -72,9 +72,9 @@ object ActivityTestTools {
stopResponse()
goMainThread {
MIUIDialog(context) {
- setTitle(R.string.BroadcastReceiveTimeout)
- setMessage(R.string.BroadcastReceiveTimeoutTips)
- setRButton(R.string.OK) { dismiss() }
+ setTitle(R.string.broadcast_receive_timeout)
+ setMessage(R.string.broadcast_receive_timeout_tips)
+ setRButton(R.string.ok) { dismiss() }
}.show()
}
}
diff --git a/app/src/main/java/statusbar/lyric/tools/ActivityTools.kt b/app/src/main/java/statusbar/lyric/tools/ActivityTools.kt
index 2e72a6b7..d3b3f804 100644
--- a/app/src/main/java/statusbar/lyric/tools/ActivityTools.kt
+++ b/app/src/main/java/statusbar/lyric/tools/ActivityTools.kt
@@ -95,28 +95,26 @@ object ActivityTools {
val jsonObject = JSONObject(response)
if (jsonObject.getString("tag_name").split("v").toTypedArray()[1].toInt() > BuildConfig.VERSION_CODE) {
MIUIDialog(activity) {
- setTitle(String.format("%s [%s]", activity.getString(R.string.HaveNewVersion), jsonObject.getString("name")))
+ setTitle(String.format("%s [%s]", activity.getString(R.string.have_new_version), jsonObject.getString("name")))
setMessage(jsonObject.getString("body").replace("#", ""))
- setRButton(R.string.Update) {
+ setRButton(R.string.update) {
try {
- val uri = Uri.parse(jsonObject.getJSONArray("assets").getJSONObject(0).getString("browser_download_url"))
- val intent = Intent(Intent.ACTION_VIEW, uri)
- activity.startActivity(intent)
+ openUrl(jsonObject.getJSONArray("assets").getJSONObject(0).getString("browser_download_url"))
} catch (e: JSONException) {
- showToastOnLooper(activity.getString(R.string.GetNewVersionError) + e)
+ showToastOnLooper(activity.getString(R.string.get_new_version_error) + e)
}
dismiss()
}
- setLButton(R.string.Cancel) { dismiss() }
+ setLButton(R.string.cancel) { dismiss() }
}.show()
} else {
- showToastOnLooper(activity.getString(R.string.NoNewVersion))
+ showToastOnLooper(activity.getString(R.string.no_new_version))
}
} catch (_: JSONException) {
- showToastOnLooper(activity.getString(R.string.CheckUpdateError))
+ showToastOnLooper(activity.getString(R.string.check_update_error))
}
}.isNot {
- showToastOnLooper(activity.getString(R.string.CheckUpdateError))
+ showToastOnLooper(activity.getString(R.string.check_update_error))
}
}.start()
}
@@ -131,9 +129,9 @@ object ActivityTools {
if (BuildConfig.VERSION_CODE in minVersionCode..maxVersionCode) {
if (jsonObject.getBoolean("forcibly")) {
MIUIDialog(activity) {
- setTitle(activity.getString(R.string.Announcement))
+ setTitle(activity.getString(R.string.announcement))
setMessage(jsonObject.getString("data"))
- setRButton(activity.getString(R.string.OK)) { dismiss() }
+ setRButton(activity.getString(R.string.ok)) { dismiss() }
if (jsonObject.getBoolean("isLButton")) {
setLButton(jsonObject.getString("lButton")) {
openUrl(jsonObject.getString("url"))
@@ -146,7 +144,7 @@ object ActivityTools {
}
}.isNot {
- showToastOnLooper(activity.getString(R.string.GetAnnouncementError))
+ showToastOnLooper(activity.getString(R.string.get_announcement_error))
}
}.start()
diff --git a/app/src/main/java/statusbar/lyric/tools/ConfigTools.kt b/app/src/main/java/statusbar/lyric/tools/ConfigTools.kt
index e963a902..ffa4af03 100644
--- a/app/src/main/java/statusbar/lyric/tools/ConfigTools.kt
+++ b/app/src/main/java/statusbar/lyric/tools/ConfigTools.kt
@@ -44,7 +44,7 @@ class ConfigTools {
}
fun reload() {
- if (xSP.isNull()) {
+ xSP.isNull {
xSP = Tools.getPref("Lyric_Config")
mSP = xSP
return
@@ -64,7 +64,7 @@ class ConfigTools {
@Suppress("UNCHECKED_CAST")
fun opt(key: String, defValue: T): T {
- if (mSP.isNull()) {
+ mSP.isNull {
return defValue
}
return when (defValue) {
diff --git a/app/src/main/java/statusbar/lyric/tools/LogTools.kt b/app/src/main/java/statusbar/lyric/tools/LogTools.kt
index 1eadc8c5..22517823 100644
--- a/app/src/main/java/statusbar/lyric/tools/LogTools.kt
+++ b/app/src/main/java/statusbar/lyric/tools/LogTools.kt
@@ -31,8 +31,8 @@ object LogTools {
private const val XP_TAG = "LSPosed-Bridge"
- fun Any?.log() {
- if (!BuildConfig.DEBUG) return
+ fun Any?.log(): Any? {
+ if (!BuildConfig.DEBUG) return this
val content = if (this is Throwable) Log.getStackTraceString(this) else this.toString()
if (content.length > maxLength) {
val chunkCount = content.length / maxLength
@@ -51,5 +51,6 @@ object LogTools {
Log.d(TAG, content)
Log.d(XP_TAG, "$TAG:$content")
}
+ return this
}
}
diff --git a/app/src/main/java/statusbar/lyric/tools/Tools.kt b/app/src/main/java/statusbar/lyric/tools/Tools.kt
index 8634149e..b3fb9431 100644
--- a/app/src/main/java/statusbar/lyric/tools/Tools.kt
+++ b/app/src/main/java/statusbar/lyric/tools/Tools.kt
@@ -39,6 +39,8 @@ import statusbar.lyric.tools.LogTools.log
import java.io.DataOutputStream
import java.util.*
import java.util.regex.Pattern
+import kotlin.properties.Delegates
+import kotlin.properties.ReadWriteProperty
@SuppressLint("StaticFieldLeak")
@@ -48,11 +50,36 @@ object Tools {
private var index: Int = 0
+ val isMIUI by lazy { isPresent("android.provider.MiuiSettings") }
+ val togglePrompts: Boolean
+ get() {
+ arrayOf("com.lge.adaptive.JavaImageUtil").forEach {
+ if (isPresent(it)) return true
+ if (isMIUI) return true
+ }
+ return false
+ }
- fun View.isTargetView(callback: (TextView) -> Unit) {
+ private fun isPresent(name: String): Boolean {
+ return try {
+ Objects.requireNonNull(Thread.currentThread().contextClassLoader).loadClass(name)
+ true
+ } catch (e: ClassNotFoundException) {
+ false
+ }
+ }
+ fun observableChange(initialValue: T, onChange: (oldValue: T, newValue: T) -> Unit): ReadWriteProperty {
+ return Delegates.observable(initialValue) { _, oldVal, newVal ->
+ if (oldVal != newVal) {
+ onChange(oldVal, newVal)
+ }
+ }
+ }
+
+ fun View.isTargetView(): Boolean {
if (this@Tools::target.isInitialized) {
if (this == target) {
- callback(target)
+ return true
}
} else {
val className = XposedOwnSP.config.textViewClassName
@@ -60,8 +87,8 @@ object Tools {
val parentClass = XposedOwnSP.config.parentClassName
val parentID = XposedOwnSP.config.parentID
if (className.isEmpty() || parentClass.isEmpty() || parentID == 0) {
- EzXHelper.moduleRes.getString(R.string.LoadClassEmpty).log()
- return
+ EzXHelper.moduleRes.getString(R.string.load_class_empty).log()
+ return false
}
if (this is TextView) {
if (this::class.java.name == className) {
@@ -72,7 +99,7 @@ object Tools {
if (parentID == parentView.id) {
if (index == XposedOwnSP.config.index) {
target = this
- callback(this)
+ return true
} else {
index += 1
}
@@ -83,7 +110,7 @@ object Tools {
}
}
}
-
+ return false
}
diff --git a/app/src/main/java/statusbar/lyric/view/EdgeTransparentView.kt b/app/src/main/java/statusbar/lyric/view/EdgeTransparentView.kt
index 3ba5241d..5af40e48 100644
--- a/app/src/main/java/statusbar/lyric/view/EdgeTransparentView.kt
+++ b/app/src/main/java/statusbar/lyric/view/EdgeTransparentView.kt
@@ -11,10 +11,14 @@ import android.graphics.PorterDuffXfermode
import android.graphics.Shader
import android.view.View
import android.widget.FrameLayout
+import statusbar.lyric.config.XposedOwnSP.config
@SuppressLint("ViewConstructor")
open class EdgeTransparentView(context: Context, private val drawSize: Float = 50f) : FrameLayout(context) {
- private var mPaint: Paint = Paint(Paint.ANTI_ALIAS_FLAG)
+ private var mPaint: Paint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
+ style = Paint.Style.FILL
+ xfermode = PorterDuffXfermode(PorterDuff.Mode.DST_OUT)
+ }
private var mWidth = 0
private var mHeight = 0
@@ -26,32 +30,48 @@ open class EdgeTransparentView(context: Context, private val drawSize: Float = 5
mHeight = height
}
- //渐变颜色
- init {
- mPaint.style = Paint.Style.FILL
- mPaint.setXfermode(PorterDuffXfermode(PorterDuff.Mode.DST_OUT))
- }
private fun initShader() {
mPaint.setShader(LinearGradient(0f, 0f, 0f, drawSize, intArrayOf(Color.WHITE, Color.TRANSPARENT), floatArrayOf(0f, 1f), Shader.TileMode.CLAMP))
}
override fun drawChild(canvas: Canvas, child: View, drawingTime: Long): Boolean {
- val layerSave = canvas.saveLayer(0f, 0f, mWidth.toFloat(), mHeight.toFloat(), null, Canvas.ALL_SAVE_FLAG)
val drawChild = super.drawChild(canvas, child, drawingTime)
val offset = (mHeight - mWidth) / 2f
-
val saveCount = canvas.save()
- canvas.rotate(270f, mWidth / 2f, mHeight / 2f)
- canvas.translate(0f, offset)
- canvas.drawRect(0 - offset, 0f, mWidth + offset, drawSize, mPaint)
- canvas.restoreToCount(saveCount)
+ var start = false
+ var end = false
+ when (config.lyricBlurredEdgesType) {
+ 0 -> {
+ start = true
+ end = true
+ }
- canvas.rotate(90f, mWidth / 2f, mHeight / 2f)
- canvas.translate(0f, offset)
- canvas.drawRect(0 - offset, 0f, mWidth + offset, drawSize, mPaint)
- canvas.restoreToCount(saveCount)
+ 1 -> {
+ start = true
+ }
+ 2 -> {
+ end = true
+ }
+ }
+ if (start) {
+ canvas.apply {
+ rotate(270f, mWidth / 2f, mHeight / 2f)
+ translate(0f, offset)
+ drawRect(0 - offset, 0f, mWidth + offset, drawSize, mPaint)
+ restoreToCount(saveCount)
+ }
+ }
+ if (end) {
+ canvas.apply {
+ rotate(90f, mWidth / 2f, mHeight / 2f)
+ translate(0f, offset)
+ drawRect(0 - offset, 0f, mWidth + offset, drawSize, mPaint)
+ restoreToCount(saveCount)
+ }
+ }
+ val layerSave = canvas.saveLayer(0f, 0f, mWidth.toFloat(), mHeight.toFloat(), null, Canvas.ALL_SAVE_FLAG)
canvas.restoreToCount(layerSave)
return drawChild
}
diff --git a/app/src/main/java/statusbar/lyric/view/LyricTextView.kt b/app/src/main/java/statusbar/lyric/view/LyricTextView.kt
index a94d914c..f08bcbc0 100644
--- a/app/src/main/java/statusbar/lyric/view/LyricTextView.kt
+++ b/app/src/main/java/statusbar/lyric/view/LyricTextView.kt
@@ -54,7 +54,7 @@ class LyricTextView(context: Context) : TextView(context) {
override fun onTextChanged(text: CharSequence, start: Int, lengthBefore: Int, lengthAfter: Int) {
super.onTextChanged(text, start, lengthBefore, lengthAfter)
- stopScroll()
+ if (!isStop)stopScroll()
this.text = text.toString()
init()
postInvalidate()
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 5809ae95..9a2700a6 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -1,140 +1,152 @@
- 墨-状态栏歌词
- 墨-状态栏歌词
- 如果无法显示歌词,请尝试停止音乐软件并重新启动SystemUI,并检查Lyric Getter
- 配置重置成功
- 有新版本
- 更新
- 取消
- 退出
- 重置
- 获取新版本错误
- 已是最新版
- 检查更新时出现错误
- 公告
- 确定
- 获取公告时出现错误
- 首次使用提示
- 不支持Xposed框架
- 重新启动应用
- 没有Lyric Getter
- 没有支持的版本的Lyric Getter
- 点击安装
- 已安装
- 不支持的Lyric Getter
- 菜单
- 隐藏桌面图标
- 打印Xposed日志
- 检查更新
- 重置配置
- 重启SystemUI
- 模块版本
- 备份配置
- 恢复配置
- 模块构建时间
- 确定要重新启动SystemUI吗?
- 主开关
- Hook页>
- 测试模式
- 放宽条件
- 允许部分类出现,但是可能会多出许多hook点
- 歌词页
- 图标页
- 自定义图标页
- 扩展页
- 选择页
- 歌词宽度
- 范围:0%–100%,0代表自适应宽度
- 固定歌词宽度
- 打开后,歌词的外部宽度固定,不随歌词变化而变化
- 歌词颜色和透明度
- 请输入十六进制颜色值
- 歌词大小
- 范围:状态栏高度的0%–100%,0代表跟随时间
- 歌词字间距
- 范围:0–50
- 歌词笔画宽度
- 范围:0–400
- 歌词速度
- 范围:0–20
- * 歌词模糊边缘
- * 歌词模糊半径
- 范围:0–100
- 歌词顶边距
- 范围:–100–100
- 歌词右边距
- 范围:–500–500
- 歌词左边距
- 范围:–500–500
- 歌词底边距
- 范围:–100–100
- * 正则表达式屏蔽
- 使用正则表达式匹配来屏蔽歌词
- 图标开关
- 图标大小
- 范围:状态栏高度的0%–100%,0代表以下时钟
- 图标上边距
- 范围:–100–100
- 图标下边距
- 范围:–100–100
- 图标左边距
- 范围:–500–500
- 图标颜色和透明度
- 请输入十六进制颜色值
- 颜色错误
- 输入错误
- 时间格式
- 歌词模式
- 获取Hook点
- 主开关关闭
- Hook成功
- 钩子失败
- 开始Hook所有TextView
- %s已满足初步要求,共有%s个符合要求
- 没有符合要求的TextView
- 发送:%s
- 清除TextView列表及其关联数据
- 我不理解时间格式
- 加载Class:%s
- 请先打开测试模式配置
- 加载失败,未找到该Class
- 加载成功,Class:%s
- 未找到Hook点
- 请尝试重新启动SystemUi,如果仍然无法找到,请联系开发人员
- 是否选择此Hook点
- 重启应用程序生效
- 强制显示图标
- 是否重复:%s;Index:%s
- 广播接收超时
- 请先重启系统界面,如依然超时请联系开发者
- 隐藏时间
- 歌词动画
- None
- Top
- Bottom
- Start
- End
- ScaleXY
- ScaleX
- ScaleY
- Random
- * 歌词添加位置
- Start
- End
- * 有歌词时自动隐藏通知图标
- * 限制可见性更改
- 可以防止部分系统的特性导致有时间会出现
- * 锁定屏幕时隐藏歌词
- 建议先关闭其他修改状态栏布局的模块后,再来此页面选择Hook点\n有效的Hook点选择:状态栏显示模块名字,并且时间隐藏
- * 隐藏运营商
- 歌词背景颜色和透明度
- 请输入十六进制颜色值
- 歌词背景半径
- 范围:0–100
- 方案 1
- 方案 2
- * 歌词反色方案
- 带 * 的选项,重启SystemUI生效
- 动态歌词速度(Beta)
+ 墨-状态栏歌词
+ 如果无法显示歌词,请尝试停止音乐软件并重新启动系统界面,并检查Lyric Getter
+ 配置重置成功
+ 有新版本
+ 更新
+ 取消
+ 退出
+ 重置
+ 获取新版本错误
+ 已是最新版
+ 检查更新时出现错误
+ 公告
+ 确定
+ 获取公告时出现错误
+ 首次使用提示
+ 不支持Xposed框架
+ 重新启动应用
+ 没有Lyric Getter
+ 没有支持的Lyric Getter
+ 点击安装
+ 已安装
+ 不支持的Lyric Getter
+ 菜单
+ 隐藏桌面图标
+ 打印Xposed日志
+ 检查更新
+ 重置配置
+ 重启系统界面
+ 模块版本
+ 备份配置
+ 恢复配置
+ 模块构建时间
+ 确定要重新启动系统界面吗?
+ 主开关
+ Hook页>
+ 测试模式
+ 放宽条件
+ 允许部分类出现,但是可能会多出许多hook点
+ 歌词页
+ 图标页
+ 自定义图标页
+ 扩展页
+ 选择页
+ 歌词宽度
+ 范围:0%–100%,0代表自适应宽度
+ 固定歌词宽度
+ 打开后,歌词的外部宽度固定,不随歌词变化而变化
+ 歌词颜色和透明度
+ 请输入十六进制颜色值
+ 歌词大小
+ 范围:状态栏高度的0%–100%,0代表跟随时间
+ 歌词字间距
+ 范围:0–50
+ 歌词粗细
+ 范围:0–400
+ 歌词速度
+ 范围:0–20
+ * 歌词模糊边缘
+ * 歌词模糊半径
+ 范围:0–100
+ 歌词上边距
+ 范围:–100–100
+ 歌词右边距
+ 范围:–500–500
+ 歌词左边距
+ 范围:–500–500
+ 歌词底边距
+ 范围:–100–100
+ * 正则表达式屏蔽
+ 使用正则表达式匹配来屏蔽歌词
+ 图标开关
+ 图标大小
+ 范围:状态栏高度的0%–100%,0代表以下时钟
+ 图标上边距
+ 范围:–100–100
+ 图标下边距
+ 范围:–100–100
+ 图标左边距
+ 范围:–500–500
+ 图标颜色和透明度
+ 请输入十六进制颜色值
+ 颜色错误
+ 输入错误
+ 时间格式
+ 歌词模式
+ 获取Hook点
+ 主开关关闭
+ Hook成功
+ 钩子失败
+ 开始Hook所有TextView
+ %s已满足初步要求,共有%s个符合要求
+ 没有符合要求的TextView
+ 发送:%s
+ 清除TextView列表及其关联数据
+ 我不理解时间格式
+ 加载Class:%s
+ 请先打开测试模式配置
+ 加载失败,未找到该Class
+ 加载成功,Class:%s
+ 未找到Hook点
+ 请尝试重新启动系统界面,如果仍然无法找到,请联系开发人员
+ 是否选择此Hook点
+ 重启应用程序生效
+ 强制显示图标
+ 是否重复:%s;Index:%s
+ 广播接收超时
+ 请先重启系统界面,如依然超时请联系开发者
+ 隐藏时间
+ 歌词动画
+ 无效果
+ 上划效果
+ 下划效果
+ 左划效果
+ 右划效果
+ 吸收效果
+ X轴翻页
+ Y轴翻页
+ 随机效果
+ * 歌词添加位置
+ 靠左
+ 靠右
+ * 有歌词时自动隐藏通知图标
+ * 限制可见性更改
+ 可以防止部分系统的特性导致有时间会出现
+ * 锁定屏幕时隐藏歌词
+ 建议先关闭其他修改状态栏布局的模块后,再来此页面选择Hook点\n有效的Hook点选择:状态栏显示模块名字,并且时间隐藏
+ * 隐藏运营商
+ 歌词背景颜色和透明度
+ 请输入十六进制颜色值
+ 歌词背景半径
+ 范围:0–100
+ 方案 1
+ 方案 2
+ * 歌词反色方案
+ 带 * 的选项,重启系统界面生效
+ 动态歌词速度(Beta)
+ * 点击状态栏隐藏歌词
+ 系统特性:切换外观后,墨-状态栏歌词 重启系统界面生效
+ 系统特供页
+ * MIUI隐藏网速
+ 仅右边
+ 仅左边
+ 两边
+ * 歌词模糊边缘类型
+ * 状态栏滑动切歌
+ * 滑动切歌X半径
+ 范围:50–2000
+ * 滑动切歌Y半径
+ 范围:10–100
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 12afbad8..118b49b6 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -1,140 +1,152 @@
- 墨-状态栏歌词
- 墨-状态栏歌词
- 如果無法顯示歌詞,請嘗試停止音樂軟體並重新啟動SystemUI,並檢查Lyric Getter
- 配置重置成功
- 有新版本
- 更新
- 取消
- 退出
- 重置
- 获取新版本错误
- 已是最新版
- 检查更新时出现错误
- 公告
- 確定
- 获取公告时出现错误
- 首次使用提示
- 不支持Xposed框架
- 重新啟動應用
- 沒有歌詞獲取器
- 沒有支持的版本的歌詞獲取器
- 點擊安裝
- 已安裝
- 不支持的歌詞獲取器
- 菜單
- 隱藏桌面圖標
- 打印Xposed日誌
- 檢查更新
- 重置配置
- 重啟SystemUi
- 模塊版本
- 備份配置
- 恢復配置
- 模塊構建時間
- 確定要重新啟動System UI嗎?
- 主開關
- Hook頁
- 測試模式
- 放寬條件
- 允許部分類出現,但是可能會多許多hook點
- 歌詞頁
- 圖標頁
- 自訂圖示頁
- 擴展頁
- 選擇頁
- 歌詞寬度
- 範圍:0%–100%,0代表自適應寬度
- 固定歌詞寬度
- 打開後,歌詞的外部寬度固定,不隨歌詞變化而變化
- 歌詞顏色和透明度
- 請輸入十六進制顏色值
- 歌詞大小
- 範圍:狀態欄高度的0%–100%,0代表跟隨時間
- 歌詞字間距
- 範圍:0–50
- 歌詞筆劃寬度
- 範圍:0–400
- 歌詞速度
- 範圍:0–20
- * 歌詞模糊邊緣
- * 歌詞模糊半徑
- 範圍:0–100
- 歌詞上邊距
- 範圍:–100–100
- 歌詞右邊距
- 範圍:–500–500
- 歌詞左邊距
- 範圍:–500–500
- 歌詞底邊距
- 範圍:–100–100
- * 正則表達式屏蔽
- 使用正則表達式匹配來屏蔽歌詞
- 圖標開關
- 圖標大小
- 範圍:狀態欄高度的0%–100%,0代表以下時鐘
- 圖標上邊距
- 範圍:–100–100
- 圖示下邊距
- 範圍:–100–100
- 圖標左邊距
- 範圍:–500–500
- 圖標顏色和透明度
- 請輸入十六進制顏色值
- 顏色錯誤
- 輸入錯誤
- 時間格式
- 歌詞模式
- 獲取鉤子點
- 主開關關閉
- Hook成功
- Hook失敗
- 開始Hook所有TextView
- %s已滿足初步要求,共有%s個符合要求
- 沒有符合要求的TextView
- 發送:%s
- 清除TextView列表及其關聯數據
- 我不理解時間格式
- 加載Class:%s
- 請先打開測試模式配置
- 加載失敗,未找到該Class
- 加載成功,Class:%s
- 未找到Hook點
- 請嘗試重新啟動SystemUi,如果仍然無法找到,請聯繫開發人員
- 是否選擇此Hook點
- 重啟應用程式生效
- 強制顯示圖示
- 是否重複:%s;Index:%s
- 廣播接收超時
- 請先重啟系統介面,如依然超時請聯繫開發者
- 隱藏時間
- 歌詞動畫
- None
- Top
- Bottom
- Start
- End
- ScaleXY
- ScaleX
- ScaleY
- Random
- * 歌詞添加位置
- Start
- End
- * 有歌詞時自動隱藏通知圖示
- * 限制可見性更改
- 可以防止部分系統的特性導致有時間會出現
- * 鎖定螢幕時隱藏歌詞
- 建議先關閉其他修改狀態列佈局的模組后,再來此頁面選擇Hook點\n有效的Hook點選擇:狀態列顯示模組名字,並且時間隱藏
- * 隱藏運營商
- 歌詞背景顏色和透明度
- 請輸入十六進制顏色值
- 歌詞背景半徑
- 範圍:0–100
- 方案 1
- 方案 2
- * 歌詞反色方案
- 帶 * 的選項,重啟SystemUI生效
- 動態歌詞速度(Beta)
+ 墨-狀態列歌詞
+ 如果無法顯示歌詞,請嘗試停止音樂軟體並重新啟動系統UI,並檢查Lyric Getter
+ 配置重置成功
+ 有新版本
+ 更新
+ 取消
+ 退出
+ 重置
+ 獲取新版本錯誤
+ 已是最新版
+ 檢查更新時出現錯誤
+ 告式
+ 確定
+ 获取公告时出现错误
+ 首次使用
+ 不支持Xposed框架
+ 重新應用程式
+ 沒有Lyric Getter
+ 沒有支持的Lyric Getter
+ 點擊安裝
+ 已安裝
+ 不支持的歌詞獲取器
+ 菜單
+ 隱藏桌面圖示
+ 打印Xposed日誌
+ 檢查更新
+ 重置配置
+ 重啟系統UI
+ 模塊版本
+ 備份配置
+ 恢復配置
+ 模塊構建時間
+ 確定要重新啟動System UI嗎?
+ 主開關
+ Hook頁
+ 測試模式
+ 放寬條件
+ 允許部分類出現,但是可能會多許多hook點
+ 歌詞頁
+ 圖示頁
+ 自訂圖示頁
+ 擴展頁
+ 選擇頁
+ 歌詞寬度
+ 範圍:0%–100%,0代表自適應寬度
+ 固定歌詞寬度
+ 打開後,歌詞的外部寬度固定,不隨歌詞變化而變化
+ 歌詞顏色和透明度
+ 請輸入十六進制顏色值
+ 歌詞大小
+ 範圍:狀態列高度的0%–100%,0代表跟隨時間
+ 歌詞字間距
+ 範圍:0–50
+ 歌詞粗細
+ 範圍:0–400
+ 歌詞速度
+ 範圍:0–20
+ * 歌詞模糊邊緣
+ * 歌詞模糊半徑
+ 範圍:0–100
+ 歌詞上邊距
+ 範圍:–100–100
+ 歌詞右邊距
+ 範圍:–500–500
+ 歌詞左邊距
+ 範圍:–500–500
+ 歌詞底邊距
+ 範圍:–100–100
+ * 正則表達式屏蔽
+ 使用正則表達式匹配來屏蔽歌詞
+ 圖示開關
+ 圖示大小
+ 範圍:狀態列高度的0%–100%,0代表以下時鐘
+ 圖示上邊距
+ 範圍:–100–100
+ 圖示下邊距
+ 範圍:–100–100
+ 圖示左邊距
+ 範圍:–500–500
+ 圖示顏色和透明度
+ 請輸入十六進制顏色值
+ 顏色錯誤
+ 輸入錯誤
+ 時間格式
+ 歌詞模式
+ 獲取鉤子點
+ 主開關關閉
+ Hook成功
+ Hook失敗
+ 開始Hook所有TextView
+ %s已滿足初步要求,共有%s個符合要求
+ 沒有符合要求的TextView
+ 發送:%s
+ 清除TextView列表及其關聯數據
+ 我不理解時間格式
+ 加載Class:%s
+ 請先打開測試模式配置
+ 加載失敗,未找到該Class
+ 加載成功,Class:%s
+ 未找到Hook點
+ 請嘗試重新啟動系統UI,如果仍然無法找到,請聯繫開發人員
+ 是否選擇此Hook點
+ 重啟應用程式生效
+ 強制顯示圖示
+ 是否重複:%s;Index:%s
+ 廣播接收超時
+ 請先重啟系統UI,如依然超時請聯繫開發者
+ 隱藏時間
+ 歌詞動畫
+ 無效果
+ 上滑效果
+ 下滑效果
+ 左劃效果
+ 右劃效果
+ 吸收效果
+ X軸翻頁
+ Y軸翻頁
+ 隨機效果
+ * 歌詞添加位置
+ 靠左
+ 靠右
+ * 有歌詞時自動隱藏通知圖示
+ * 限制可見性更改
+ 可以防止部分系統的特性導致有時間會出現
+ * 鎖定螢幕時隱藏歌詞
+ 建議先關閉其他修改狀態列佈局的模組后,再來此頁面選擇Hook點\n有效的Hook點選擇:狀態列顯示模組名字,並且時間隱藏
+ * 隱藏運營商
+ 歌詞背景顏色和透明度
+ 請輸入十六進制顏色值
+ 歌詞背景半徑
+ 範圍:0–100
+ 方案 1
+ 方案 2
+ * 歌詞反色方案
+ 帶 * 的選項,重啟系統UI生效
+ 動態歌詞速度(Beta)
+ * 點擊狀態列隱藏歌詞
+ 系統特性:切換外觀后,墨-狀態列歌詞 重啟系統UI生效
+ 系統特供頁
+ * MIUI隱藏網速
+ 僅右邊
+ 僅左邊
+ 兩邊
+ * 歌詞模糊邊緣類型
+ * 狀態列滑動切歌
+ * 滑動切歌X半徑
+ 範圍:50–2000
+ * 滑動切歌Y半徑
+ 範圍:10–100
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 44ac1024..de34b83b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,141 +1,153 @@
- StatusBar lyric
- Status bar lyric
- If the lyrics cannot be displayed, please try to stop the music software and restart the SystemUI,and check Lyric Getter
- The config reset succeeded
- There is a new version
- Update
- Cancel
- Exit
- Reset
- Get the new version error
- There is no new version
- Check for update errors
- Announcement
- OK
- Get the announcement error
- Tips for first use
- The Xposed framework is not supported
- Restart the App
- No LyricGetter
- No LyricGetter
- Click Install
- Installed
- Unsupported LyricGetter
- Menu
- Hide desktop icons
- Print Xposed Log
- Check for updates
- Reset the config
- Restart the SystemUi
- Module version
- Back up the config
- Recovery the config
- Module build time
- Are you sure you want to restart the System UI?
- Master Switch
- Hook Page
- Test Mode
- Relax Conditions
- Some classes are allowed, but there may be many more hook points
- Lyric Page
- Icon Page
- Customize Icon Page
- Extend Page
- Choose Page
- Lyric Width
- Range: 0%–100% , 0 is Adaptive width
- Fixed lyric width
- When turned on, the outer width of the lyrics is fixed and does not change with the lyrics
- Lyric Color And Transparency
- Please enter a decimal Color
- Lyric Size
- Range: 0%–100% of the height of the status bar, 0 is the following clock
- Lyric Letter Spacing
- Range 0–50
- Lyric Stroke Width
- Range 0–400
- Lyric Speed
- Range 0–20
- * Lyric Blurred Edges
- * Lyric Blurred Edges Radius
- Range 0–100
- Lyric Top Margins
- Range –100–100
- Lyric End Margins
- Range –500–500
- Lyric Start Margins
- Range –500–500
- Lyric Bottom Margins
- Range –100–100
- * Regex Replace
- Block lyrics with regular expression matching
- Icon Switch
- Icon Size
- Range: 0%–100% of the height of the status bar, 0 is the following clock
- Icon Top Margins
- Range –100–100
- Icon Bottom Margins
- Range –100–100
- Icon Left Margins
- Range –500–500
- Icon Color And Transparency
- Please enter a decimal Color
- Color Error
- Input Error
- TimeFormat
- Lyric Mode
- Get the Hook point
- Master switch is off
- Hook Succeeded
- Hook Failed
- Start Hooking All TextView
- %s meets preliminary requirements,Total: %s meets requirements
- There is no Textview that meets the requirements
- Send: %s
- Be clear about Text View Lists and their associated data
- I don\'t understand the time format
- Load Class: %s
- Please turn on the test mode configuration first
- Load failed,Class not found
- Load Succeed,Class: %s
- Hook not found
- Please try restarting the SystemUi, if you still can\'t find it, contact the developer
- Whether to select this Hook point
- Restart App Effect
- Force The Icon To Be Displayed
+ StatusBar lyric
+ If the lyrics cannot be displayed, please try to stop the music software and restart the SystemUI,and check Lyric Getter
+ The config reset succeeded
+ There is a new version
+ Update
+ Cancel
+ Exit
+ Reset
+ Get the new version error
+ There is no new version
+ Check for update errors
+ Announcement
+ OK
+ Get the announcement error
+ Tips for first use
+ The Xposed framework is not supported
+ Restart the App
+ No LyricGetter
+ No LyricGetter
+ Click Install
+ Installed
+ Unsupported LyricGetter
+ Menu
+ Hide desktop icons
+ Print Xposed Log
+ Check for updates
+ Reset the config
+ Restart the SystemUi
+ Module version
+ Back up the config
+ Recovery the config
+ Module build time
+ Are you sure you want to restart the System UI?
+ Master Switch
+ Hook Page
+ Test Mode
+ Relax Conditions
+ Some classes are allowed, but there may be many more hook points
+ Lyric Page
+ Icon Page
+ Customize Icon Page
+ Extend Page
+ Choose Page
+ Lyric Width
+ Range: 0%–100% , 0 is Adaptive width
+ Fixed lyric width
+ When turned on, the outer width of the lyrics is fixed and does not change with the lyrics
+ Lyric Color And Transparency
+ Please enter a decimal Color
+ Lyric Size
+ Range: 0%–100% of the height of the status bar, 0 is the following clock
+ Lyric Letter Spacing
+ Range 0–50
+ Lyric Stroke Width
+ Range 0–400
+ Lyric Speed
+ Range 0–20
+ * Lyric Blurred Edges
+ * Lyric Blurred Edges Radius
+ Range 0–100
+ Lyric Top Margins
+ Range –100–100
+ Lyric End Margins
+ Range –500–500
+ Lyric Start Margins
+ Range –500–500
+ Lyric Bottom Margins
+ Range –100–100
+ * Regex Replace
+ Block lyrics with regular expression matching
+ Icon Switch
+ Icon Size
+ Range: 0%–100% of the height of the status bar, 0 is the following clock
+ Icon Top Margins
+ Range –100–100
+ Icon Bottom Margins
+ Range –100–100
+ Icon Left Margins
+ Range –500–500
+ Icon Color And Transparency
+ Please enter a decimal Color
+ Color Error
+ Input Error
+ TimeFormat
+ Lyric Mode
+ Get the Hook point
+ Master switch is off
+ Hook Succeeded
+ Hook Failed
+ Start Hooking All TextView
+ %s meets preliminary requirements,Total: %s meets requirements
+ There is no Textview that meets the requirements
+ Send: %s
+ Be clear about Text View Lists and their associated data
+ I don\'t understand the time format
+ Load Class: %s
+ Please turn on the test mode configuration first
+ Load failed,Class not found
+ Load Succeed,Class: %s
+ Hook not found
+ Please try restarting the SystemUi, if you still can\'t find it, contact the developer
+ Whether to select this Hook point
+ Restart App Effect
+ Force The Icon To Be Displayed
- IsRepeat: %s;Index: %s
- Broadcast Receive Timeout
- Please restart the SystemUI first, if it still times out, please contact the developer
- Hide Time
- Lyric Animation
- None
- Top
- Bottom
- Start
- End
- ScaleXY
- ScaleX
- ScaleY
- Random
- * Lyric Add Location
- Start
- End
- Automatically hide notification icons when there are lyrics
- * Limit Visibility Change
- It can prevent the characteristics of some systems from causing time to appear
- * Hide Lyric When Lock Screen
- It is recommended to close other modules that modify the layout of the status bar first, and then come to this page to select Hook Points\nEffective Hook Point Selection: The status bar displays the module name, and the time is hidden
- * Hide Carrier
- Lyric Background Color And Transparency
- Please enter a decimal Color
- Lyric Background Radius
- Range 0–100
- Color Scheme 1
- Color Scheme 2
- * Lyric Color Scheme
- Option with * , Restart SystemUI to take effect
- Dynamic Lyric Speed(Beta)
+ IsRepeat: %s;Index: %s
+ Broadcast Receive Timeout
+ Please restart the SystemUI first, if it still times out, please contact the developer
+ Hide Time
+ Lyric Animation
+ None
+ Top
+ Bottom
+ Start
+ End
+ ScaleXY
+ ScaleX
+ ScaleY
+ Random
+ * Lyric Add Location
+ Start
+ End
+ Automatically hide notification icons when there are lyrics
+ * Limit Visibility Change
+ It can prevent the characteristics of some systems from causing time to appear
+ * Hide Lyric When Lock Screen
+ It is recommended to close other modules that modify the layout of the status bar first, and then come to this page to select Hook Points\nEffective Hook Point Selection: The status bar displays the module name, and the time is hidden
+ * Hide Carrier
+ Lyric Background Color And Transparency
+ Please enter a decimal Color
+ Lyric Background Radius
+ Range 0–100
+ Color Scheme 1
+ Color Scheme 2
+ * Lyric Color Scheme
+ Option with * , Restart SystemUI to take effect
+ Dynamic Lyric Speed(Beta)
+ * Click Status Bar To Hide Lyric
+ System features: After switching appearance, the ink - status bar lyrics restart the system interface to take effect
+ System Special Page
+ * MIUI Hide Network Speed
+ Lyric Blurred Edges Type End
+ Lyric Blurred Edges Type Start
+ Lyric Blurred Edges Type All
+ * Lyric Blurred Edges Type
+ * Slide Status Bar Cut Songs
+ * Slide Status Bar Cut Songs X Radius
+ Range 50–2000
+ * Slide Status Bar Cut Songs Y Radius
+ Range 10–100
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index d4fad66f..820e8acd 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath("com.android.tools.build:gradle:8.0.2")
+ classpath("com.android.tools.build:gradle:8.1.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0")
}
}
diff --git a/gradle.properties b/gradle.properties
index 4df0615d..28e8eb42 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
@@ -19,4 +19,4 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
-android.defaults.buildfeatures.buildconfig=true
+org.gradle.parallel=true
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 2e5730f3..11623d2c 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Tue Jan 25 15:10:00 CST 2022
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..44dd466e701d506bee8e5be468bcb11c3d1b7fb1
GIT binary patch
literal 8161
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
literal 0
HcmV?d00001
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 792870e9..241de243 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -4,10 +4,10 @@ dependencyResolutionManagement {
google()
mavenCentral()
maven("https://api.xposed.info")
+ maven("https://jitpack.io")
}
}
rootProject.name = "Statusbar Lyric"
include(":app")
include(":blockmiui")
include(":xtoast")
-include(":LyricGetterApi")