28 Commits

Author SHA1 Message Date
乌堆小透明
bbde7ce7ce New translations strings.xml (Polish)
[ci skip] New translations from Crowdin
2023-02-16 03:22:37 +08:00
乌堆小透明
c01b0b69a2 New translations strings.xml (Polish)
[ci skip] New translations from Crowdin
2023-02-16 02:10:52 +08:00
乌堆小透明
857c5c1842 New translations strings.xml (Vietnamese)
[ci skip] New translations from Crowdin
2023-02-15 23:31:00 +08:00
乌堆小透明
1ec424d887 New translations strings.xml (Russian)
[ci skip] New translations from Crowdin
2023-02-15 23:30:59 +08:00
乌堆小透明
74154138f1 New translations strings.xml (Spanish)
[ci skip] New translations from Crowdin
2023-02-15 23:30:57 +08:00
乌堆小透明
d1bcffb6e3 New translations strings.xml (Portuguese, Brazilian)
[ci skip] New translations from Crowdin
2023-02-15 22:29:53 +08:00
乌堆小透明
26ec692d7e New translations strings.xml (Vietnamese)
[ci skip] New translations from Crowdin
2023-02-15 22:29:52 +08:00
乌堆小透明
5d4eb70a00 New translations strings.xml (Portuguese)
[ci skip] New translations from Crowdin
2023-02-15 22:29:47 +08:00
乌堆小透明
715fd73997 New translations strings.xml (Japanese)
[ci skip] New translations from Crowdin
2023-02-15 22:29:43 +08:00
乌堆小透明
87f54a50ca New translations strings.xml (Spanish)
[ci skip] New translations from Crowdin
2023-02-15 22:29:35 +08:00
乌堆小透明
1c87621e07 New translations strings.xml (Chinese Traditional, Hong Kong)
[ci skip] New translations from Crowdin
2023-02-15 20:45:47 +08:00
乌堆小透明
495be573d7 New translations strings.xml (Portuguese, Brazilian)
[ci skip] New translations from Crowdin
2023-02-15 20:45:45 +08:00
乌堆小透明
6eadbd398c New translations strings.xml (Vietnamese)
[ci skip] New translations from Crowdin
2023-02-15 20:45:44 +08:00
乌堆小透明
729f22108a New translations strings.xml (Russian)
[ci skip] New translations from Crowdin
2023-02-15 20:45:40 +08:00
乌堆小透明
73af718717 New translations strings.xml (Portuguese)
[ci skip] New translations from Crowdin
2023-02-15 20:45:39 +08:00
乌堆小透明
92c9998c6b New translations strings.xml (Indonesian)
[ci skip] New translations from Crowdin
2023-02-15 20:01:15 +08:00
乌堆小透明
c1cbde2458 New translations strings.xml (Portuguese, Brazilian)
[ci skip] New translations from Crowdin
2023-02-15 20:01:14 +08:00
乌堆小透明
58032cff68 New translations strings.xml (Vietnamese)
[ci skip] New translations from Crowdin
2023-02-15 20:01:13 +08:00
乌堆小透明
5e5672a91e New translations strings.xml (Russian)
[ci skip] New translations from Crowdin
2023-02-15 20:01:08 +08:00
乌堆小透明
7989f38e36 New translations strings.xml (Portuguese)
[ci skip] New translations from Crowdin
2023-02-15 20:01:07 +08:00
乌堆小透明
c46ee620f7 New translations strings.xml (Polish)
[ci skip] New translations from Crowdin
2023-02-15 20:01:06 +08:00
乌堆小透明
b74818102d New translations strings.xml (Dutch)
[ci skip] New translations from Crowdin
2023-02-15 20:01:04 +08:00
乌堆小透明
9c277fbd7e New translations strings.xml (Japanese)
[ci skip] New translations from Crowdin
2023-02-15 20:01:02 +08:00
乌堆小透明
e6fb236566 New translations strings.xml (Hungarian)
[ci skip] New translations from Crowdin
2023-02-15 20:01:00 +08:00
乌堆小透明
4a03a3bfaf New translations strings.xml (Czech)
[ci skip] New translations from Crowdin
2023-02-15 20:00:56 +08:00
乌堆小透明
6a8c08e55c New translations strings.xml (Spanish)
[ci skip] New translations from Crowdin
2023-02-15 20:00:53 +08:00
乌堆小透明
c8083947fd New translations strings.xml (French)
[ci skip] New translations from Crowdin
2023-02-15 20:00:52 +08:00
乌堆小透明
32c649e38d New translations strings.xml (Romanian)
[ci skip] New translations from Crowdin
2023-02-15 20:00:51 +08:00
64 changed files with 1045 additions and 2078 deletions

View File

@@ -1,4 +1,4 @@
name: PR Check name: Android CI
on: on:
pull_request: pull_request:

View File

@@ -1,50 +0,0 @@
name: Dev
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Clone UI
run: |
cd blockmiui
git submodule init
git submodule update
- name: Build with Gradle
run: |
bash ./gradlew assembleDebug
- name: Sign Debug APK
if: success()
id: sign_debug
uses: r0adkll/sign-android-release@v1.0.4
with:
releaseDirectory: ./app/build/outputs/apk/debug
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_STORE_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_STORE_PASSWORD }}
- name: Upload Debug APK
uses: actions/upload-artifact@v2
with:
name: WooBox_Debug
path: ${{ steps.sign_debug.outputs.signedReleaseFile }}

View File

@@ -1,7 +1,9 @@
<div align="center"> <div align="center">
<img width="160" src="https://raw.githubusercontent.com/LittleTurtle2333/SimplicityTools/main/doc/ic_launcher.png" alt="logo"> <img width="160" src="https://raw.githubusercontent.com/LittleTurtle2333/SimplicityTools/main/doc/ic_launcher.png" alt="logo">
<h1>WooBox For MIUI</h1> <h1>WooBox For MIUI</h1>
<p><b><a href="https://github.com/LittleTurtle2333/SimplicityTools/blob/main/README_EN.md">English</a> 丨 简体中文</b></p> <p>
<b><a href="https://github.com/LittleTurtle2333/SimplicityTools/blob/main/README_EN.md">English</a> 丨 简体中文</b>
</p>
<a href="https://github.com/Xposed-Modules-Repo/com.lt2333.simplicitytools/releases"><img alt="GitHub all releases" src="https://img.shields.io/github/downloads/Xposed-Modules-Repo/com.lt2333.simplicitytools/total?label=Downloads"></a> <a href="https://github.com/Xposed-Modules-Repo/com.lt2333.simplicitytools/releases"><img alt="GitHub all releases" src="https://img.shields.io/github/downloads/Xposed-Modules-Repo/com.lt2333.simplicitytools/total?label=Downloads"></a>
<a href="https://github.com/LittleTurtle2333/SimplicityTools/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/LittleTurtle2333/SimplicityTools"></a> <a href="https://github.com/LittleTurtle2333/SimplicityTools/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/LittleTurtle2333/SimplicityTools"></a>
<a href="https://github.com/LittleTurtle2333/SimplicityTools/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/LittleTurtle2333/SimplicityTools"></a> <a href="https://github.com/LittleTurtle2333/SimplicityTools/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/LittleTurtle2333/SimplicityTools"></a>
@@ -15,53 +17,40 @@
开发者:[酷安@乌堆小透明](http://www.coolapk.com/u/883441) 开发者:[酷安@乌堆小透明](http://www.coolapk.com/u/883441)
当前仅基于`Android13`进行开发,`Android12`几乎不再维护。也有基于`Android13`开发,但是能在`Android12`使用的情况,请广大社区使用`Android12`的开发者自行测试和修复后提交`Pull Request`
--- ---
### 模块截图 ### 模块截图
![截图](https://raw.githubusercontent.com/LittleTurtle2333/SimplicityTools/main/doc/cn.jpg) ![截图](https://raw.githubusercontent.com/LittleTurtle2333/SimplicityTools/main/doc/cn.jpg)
--- ---
### 下载地址 ### 下载地址
Xposed Xposed仓库下载:[点击此处下载最新发行版](https://github.com/Xposed-Modules-Repo/com.lt2333.simplicitytools/releases)
仓库下载:[点击此处下载最新发行版](https://github.com/Xposed-Modules-Repo/com.lt2333.simplicitytools/releases)
酷安下载:[点击此处下载最新发行版](https://www.coolapk.com/apk/com.lt2333.simplicitytools) 酷安下载:[点击此处下载最新发行版](https://www.coolapk.com/apk/com.lt2333.simplicitytools)
--- ---
### 改进翻译 ### 改进翻译
[![Crowdin](https://badges.crowdin.net/simplicitytools/localized.svg)](https://crowdin.com/project/simplicitytools)[点击此处进入Crowdin](https://crowdin.com/project/simplicitytools) [![Crowdin](https://badges.crowdin.net/simplicitytools/localized.svg)](https://crowdin.com/project/simplicitytools)[点击此处进入Crowdin](https://crowdin.com/project/simplicitytools)
--- ---
### 第三方开源引用 ### 第三方开源引用
##### GNU General Public License v3.0 ##### GNU General Public License v3.0
[qqlittleice/MiuiHome](https://github.com/qqlittleice/MiuiHome)
[yujincheng08/BiliRoaming](https://github.com/yujincheng08/BiliRoaming) [yujincheng08/BiliRoaming](https://github.com/yujincheng08/BiliRoaming)
[Mikanoshi/CustoMIUIzer](https://code.highspec.ru/Mikanoshi/CustoMIUIzer) [Mikanoshi/CustoMIUIzer](https://code.highspec.ru/Mikanoshi/CustoMIUIzer)
[MonwF/customiuizer](https://github.com/MonwF/customiuizer) [MonwF/customiuizer](https://github.com/MonwF/customiuizer)
##### GNU General Public License v2.0 ##### GNU General Public License v2.0
[LSPosed/CorePatch](https://github.com/LSPosed/CorePatch) [LSPosed/CorePatch](https://github.com/LSPosed/CorePatch)
##### GNU Lesser General Public License v2.1 ##### GNU Lesser General Public License v2.1
[577fkj/blockmiui](https://github.com/577fkj/blockmiui) [577fkj/blockmiui](https://github.com/577fkj/blockmiui)
##### Apache License 2.0 ##### Apache License 2.0
[KyuubiRan/EzXHelper](https://github.com/KyuubiRan/EzXHelper) [KyuubiRan/EzXHelper](https://github.com/KyuubiRan/EzXHelper)
--- ---
### License ### License
[GNU General Public License v3.0](https://github.com/LittleTurtle2333/SimplicityTools/blob/main/LICENSE) [GNU General Public License v3.0](https://github.com/LittleTurtle2333/SimplicityTools/blob/main/LICENSE)

View File

@@ -1,7 +1,9 @@
<div align="center"> <div align="center">
<img width="160" src="https://raw.githubusercontent.com/LittleTurtle2333/SimplicityTools/main/doc/ic_launcher.png" alt="logo"> <img width="160" src="https://raw.githubusercontent.com/LittleTurtle2333/SimplicityTools/main/doc/ic_launcher.png" alt="logo">
<h1>WooBox For MIUI</h1> <h1>WooBox For MIUI</h1>
<p><b>English 丨 <a href="https://github.com/LittleTurtle2333/SimplicityTools/blob/main/README.md">简体中文</a></b></p> <p>
<b>English 丨 <a href="https://github.com/LittleTurtle2333/SimplicityTools/blob/main/README.md">简体中文</a></b>
</p>
<a href="https://github.com/Xposed-Modules-Repo/com.lt2333.simplicitytools/releases"><img alt="GitHub all releases" src="https://img.shields.io/github/downloads/Xposed-Modules-Repo/com.lt2333.simplicitytools/total?label=Downloads"></a> <a href="https://github.com/Xposed-Modules-Repo/com.lt2333.simplicitytools/releases"><img alt="GitHub all releases" src="https://img.shields.io/github/downloads/Xposed-Modules-Repo/com.lt2333.simplicitytools/total?label=Downloads"></a>
<a href="https://github.com/LittleTurtle2333/SimplicityTools/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/LittleTurtle2333/SimplicityTools"></a> <a href="https://github.com/LittleTurtle2333/SimplicityTools/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/LittleTurtle2333/SimplicityTools"></a>
<a href="https://github.com/LittleTurtle2333/SimplicityTools/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/LittleTurtle2333/SimplicityTools"></a> <a href="https://github.com/LittleTurtle2333/SimplicityTools/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/LittleTurtle2333/SimplicityTools"></a>
@@ -11,14 +13,7 @@
--- ---
### Module Description
Currently only developed based on `Android13`, `Android12` is almost no longer maintained. There are also cases where the development is based on `Android13`, but it can be used in `Android12`. Developers in the community who use `Android12` are requested to submit `Pull Request` after testing and repairing by themselves.
---
### Screenshot ### Screenshot
![Screenshot](https://raw.githubusercontent.com/LittleTurtle2333/SimplicityTools/main/doc/en.jpg) ![Screenshot](https://raw.githubusercontent.com/LittleTurtle2333/SimplicityTools/main/doc/en.jpg)
--- ---
@@ -27,36 +22,28 @@ Currently only developed based on `Android13`, `Android12` is almost no longer m
Xposed Repo[Click here to download the latest release](https://github.com/Xposed-Modules-Repo/com.lt2333.simplicitytools/releases) Xposed Repo[Click here to download the latest release](https://github.com/Xposed-Modules-Repo/com.lt2333.simplicitytools/releases)
--- ---
### Participate in translation ### Participate in translation
[![Crowdin](https://badges.crowdin.net/simplicitytools/localized.svg)](https://crowdin.com/project/simplicitytools)[Click here to Crowdin](https://crowdin.com/project/simplicitytools) [![Crowdin](https://badges.crowdin.net/simplicitytools/localized.svg)](https://crowdin.com/project/simplicitytools)[Click here to Crowdin](https://crowdin.com/project/simplicitytools)
--- ---
## Third party open source references ## Third party open source references
##### GNU General Public License v3.0 ##### GNU General Public License v3.0
[qqlittleice/MiuiHome](https://github.com/qqlittleice/MiuiHome)
[yujincheng08/BiliRoaming](https://github.com/yujincheng08/BiliRoaming) [yujincheng08/BiliRoaming](https://github.com/yujincheng08/BiliRoaming)
[Mikanoshi/CustoMIUIzer](https://code.highspec.ru/Mikanoshi/CustoMIUIzer) [Mikanoshi/CustoMIUIzer](https://code.highspec.ru/Mikanoshi/CustoMIUIzer)
[MonwF/customiuizer](https://github.com/MonwF/customiuizer) [MonwF/customiuizer](https://github.com/MonwF/customiuizer)
##### GNU General Public License v2.0 ##### GNU General Public License v2.0
[LSPosed/CorePatch](https://github.com/LSPosed/CorePatch) [LSPosed/CorePatch](https://github.com/LSPosed/CorePatch)
##### GNU Lesser General Public License v2.1 ##### GNU Lesser General Public License v2.1
[577fkj/blockmiui](https://github.com/577fkj/blockmiui) [577fkj/blockmiui](https://github.com/577fkj/blockmiui)
##### Apache License 2.0 ##### Apache License 2.0
[KyuubiRan/EzXHelper](https://github.com/KyuubiRan/EzXHelper) [KyuubiRan/EzXHelper](https://github.com/KyuubiRan/EzXHelper)
--- ---
## License ## License
[GNU General Public License v3.0](https://github.com/LittleTurtle2333/SimplicityTools/blob/main/LICENSE) [GNU General Public License v3.0](https://github.com/LittleTurtle2333/SimplicityTools/blob/main/LICENSE)

View File

@@ -11,8 +11,8 @@ android {
applicationId = "com.lt2333.simplicitytools" applicationId = "com.lt2333.simplicitytools"
minSdk = 31 minSdk = 31
targetSdk = 33 targetSdk = 33
versionCode = 75 versionCode = 70
versionName = "1.7.5" versionName = "1.7.0"
buildConfigField("String", "BUILD_TIME", "\"${System.currentTimeMillis()}\"") buildConfigField("String", "BUILD_TIME", "\"${System.currentTimeMillis()}\"")
} }
@@ -54,9 +54,10 @@ dependencies {
implementation("com.github.kyuubiran:EzXHelper:1.0.3") implementation("com.github.kyuubiran:EzXHelper:1.0.3")
//UI //UI
implementation(project(":blockmiui")) implementation(project(":blockmiui"))
implementation("androidx.constraintlayout:constraintlayout:2.1.4") implementation("androidx.constraintlayout:constraintlayout:2.1.3")
//APP Center //APP Center
val appCenterSdkVersion = "4.4.3" val appCenterSdkVersion = "4.4.3"
implementation("com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}") implementation("com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}")
implementation("com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}") implementation("com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}")
implementation("androidx.core:core-splashscreen:1.0.0-rc01")
} }

View File

@@ -66,7 +66,7 @@ class AboutPage : BasePage() {
}) })
Line() Line()
TitleText(text = getString(R.string.thank_list)) TitleText(text = getString(R.string.thank_list))
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.contributor_list, textId = R.string.contributor_list,
onClickListener = { onClickListener = {
@@ -80,7 +80,7 @@ class AboutPage : BasePage() {
} }
}) })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.third_party_open_source_statement, textId = R.string.third_party_open_source_statement,
onClickListener = { onClickListener = {
@@ -96,7 +96,7 @@ class AboutPage : BasePage() {
) )
Line() Line()
TitleText(text = getString(R.string.discussions)) TitleText(text = getString(R.string.discussions))
TextSummaryWithArrow(TextSummaryV(textId = R.string.qq_channel, onClickListener = { TextSummaryArrow(TextSummaryV(textId = R.string.qq_channel, onClickListener = {
try { try {
val uri = val uri =
Uri.parse("https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&inviteCode=29Mu64&from=246610&biz=ka") Uri.parse("https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&inviteCode=29Mu64&from=246610&biz=ka")
@@ -106,7 +106,7 @@ class AboutPage : BasePage() {
Toast.makeText(activity, "访问失败", Toast.LENGTH_SHORT).show() Toast.makeText(activity, "访问失败", Toast.LENGTH_SHORT).show()
} }
})) }))
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.tg_channel, textId = R.string.tg_channel,
tipsId = R.string.tg_channel_summary, tipsId = R.string.tg_channel_summary,
@@ -127,7 +127,7 @@ class AboutPage : BasePage() {
} }
}) })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.issues, textId = R.string.issues,
tipsId = R.string.issues_url, tipsId = R.string.issues_url,
@@ -144,7 +144,7 @@ class AboutPage : BasePage() {
) )
Line() Line()
TitleText(getString(R.string.other)) TitleText(getString(R.string.other))
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.app_coolapk_url, textId = R.string.app_coolapk_url,
tipsId = R.string.app_coolapk_url_summary, tipsId = R.string.app_coolapk_url_summary,
@@ -166,7 +166,7 @@ class AboutPage : BasePage() {
} }
}) })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.opensource, textId = R.string.opensource,
tipsId = R.string.github_url, tipsId = R.string.github_url,
@@ -181,7 +181,7 @@ class AboutPage : BasePage() {
} }
}) })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.participate_in_translation, textId = R.string.participate_in_translation,
tipsId = R.string.participate_in_translation_summary, tipsId = R.string.participate_in_translation_summary,

View File

@@ -13,7 +13,7 @@ import java.util.*
class MenuPage : BasePage() { class MenuPage : BasePage() {
override fun onCreate() { override fun onCreate() {
TextSummaryWithArrow(TextSummaryV(textId = R.string.reboot, onClickListener = { TextSummaryArrow(TextSummaryV(textId = R.string.reboot, onClickListener = {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.Tips) setTitle(R.string.Tips)
setMessage(R.string.are_you_sure_reboot) setMessage(R.string.are_you_sure_reboot)
@@ -28,7 +28,7 @@ class MenuPage : BasePage() {
}.show() }.show()
})) }))
TextSummaryWithArrow(TextSummaryV(textId = R.string.reboot_host, onClickListener = { TextSummaryArrow(TextSummaryV(textId = R.string.reboot_host, onClickListener = {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.Tips) setTitle(R.string.Tips)
setMessage(R.string.are_you_sure_reboot_scope) setMessage(R.string.are_you_sure_reboot_scope)

View File

@@ -66,7 +66,7 @@ class AndroidPageForS : BasePage() {
tipsId = R.string.remove_small_window_restrictions_summary tipsId = R.string.remove_small_window_restrictions_summary
), SwitchV("remove_small_window_restrictions") ), SwitchV("remove_small_window_restrictions")
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.max_wallpaper_scale, textId = R.string.max_wallpaper_scale,
onClickListener = { onClickListener = {

View File

@@ -35,7 +35,7 @@ class MainPageForS : BasePage() {
) )
}) })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.matters_needing_attention, textId = R.string.matters_needing_attention,
colorId = R.color.red, colorId = R.color.red,
@@ -51,19 +51,19 @@ class MainPageForS : BasePage() {
) )
Line() Line()
TitleText(textId = R.string.scope) TitleText(textId = R.string.scope)
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.scope_systemui, textId = R.string.scope_systemui,
tipsId = R.string.scope_systemui_summary, tipsId = R.string.scope_systemui_summary,
onClickListener = { showFragment("scope_systemui") }) onClickListener = { showFragment("scope_systemui") })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.scope_android, textId = R.string.scope_android,
tipsId = R.string.scope_android_summary, tipsId = R.string.scope_android_summary,
onClickListener = { showFragment("scope_android") }) onClickListener = { showFragment("scope_android") })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.scope_other, textId = R.string.scope_other,
tipsId = R.string.scope_other_summary, tipsId = R.string.scope_other_summary,
@@ -71,7 +71,7 @@ class MainPageForS : BasePage() {
) )
Line() Line()
TitleText(textId = R.string.about) TitleText(textId = R.string.about)
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.about_module, textId = R.string.about_module,
tips = getString(R.string.about_module_summary), tips = getString(R.string.about_module_summary),

View File

@@ -2,6 +2,7 @@ package com.lt2333.simplicitytools.activity.pages.s
import android.content.ComponentName import android.content.ComponentName
import android.content.Intent import android.content.Intent
import android.content.pm.PackageManager
import android.view.View import android.view.View
import android.widget.Switch import android.widget.Switch
import android.widget.Toast import android.widget.Toast
@@ -10,6 +11,8 @@ import cn.fkj233.ui.activity.annotation.BMPage
import cn.fkj233.ui.activity.data.BasePage import cn.fkj233.ui.activity.data.BasePage
import cn.fkj233.ui.activity.view.SwitchV import cn.fkj233.ui.activity.view.SwitchV
import cn.fkj233.ui.activity.view.TextSummaryV import cn.fkj233.ui.activity.view.TextSummaryV
import cn.fkj233.ui.dialog.MIUIDialog
import com.lt2333.simplicitytools.BuildConfig
import com.lt2333.simplicitytools.R import com.lt2333.simplicitytools.R
@@ -30,24 +33,6 @@ class OtherPageForS : BasePage() {
tipsId = R.string.home_double_tap_to_sleep_summary tipsId = R.string.home_double_tap_to_sleep_summary
), SwitchV("double_tap_to_sleep") ), SwitchV("double_tap_to_sleep")
) )
TextSummaryWithSwitch(
TextSummaryV(
textId = R.string.miuihome_recentwiew_wallpaper_darkening, tipsId = R.string.miuihome_recentwiew_wallpaper_darkening_summary
), SwitchV("miuihome_recentwiew_wallpaper_darkening", false)
)
TextSummaryWithSwitch(
TextSummaryV(
textId = R.string.miuihome_recentview_remove_card_animation, tipsId = R.string.miuihome_recentview_remove_card_animation_summary
), SwitchV("miuihome_recentview_remove_card_animation", false)
)
TextSummaryWithSwitch(
TextSummaryV(textId = R.string.miuihome_shortcut_add_small_window, tipsId = R.string.miuihome_shortcut_add_small_window_summary),
SwitchV("miuihome_shortcut_add_small_window", false)
)
TextSummaryWithSwitch(
TextSummaryV(textId = R.string.miuihome_scroll_icon_name, tipsId = R.string.miuihome_scroll_icon_name_summary),
SwitchV("miuihome_scroll_icon_name", false)
)
Line() Line()
TitleText(textId = R.string.scope_powerkeeper) TitleText(textId = R.string.scope_powerkeeper)
TextSummaryWithSwitch( TextSummaryWithSwitch(
@@ -97,7 +82,7 @@ class OtherPageForS : BasePage() {
SwitchV("make_millet_ignore_active"), SwitchV("make_millet_ignore_active"),
dataBindingRecv = makeMilletMoreAggressiveSwitchBinding.binding.getRecv(2) dataBindingRecv = makeMilletMoreAggressiveSwitchBinding.binding.getRecv(2)
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.battery_optimization, textId = R.string.battery_optimization,
tipsId = R.string.battery_optimization_summary, tipsId = R.string.battery_optimization_summary,

View File

@@ -1,7 +1,5 @@
package com.lt2333.simplicitytools.activity.pages.s package com.lt2333.simplicitytools.activity.pages.s
import android.content.Intent
import android.net.Uri
import android.view.View import android.view.View
import android.widget.Switch import android.widget.Switch
import android.widget.Toast import android.widget.Toast
@@ -13,8 +11,8 @@ import cn.fkj233.ui.activity.view.SwitchV
import cn.fkj233.ui.activity.view.TextSummaryV import cn.fkj233.ui.activity.view.TextSummaryV
import cn.fkj233.ui.activity.view.TextV import cn.fkj233.ui.activity.view.TextV
import cn.fkj233.ui.dialog.MIUIDialog import cn.fkj233.ui.dialog.MIUIDialog
import cn.fkj233.ui.dialog.NewDialog
import com.lt2333.simplicitytools.R import com.lt2333.simplicitytools.R
import java.util.HashMap
@BMPage("scope_systemui","System UI", hideMenu = false) @BMPage("scope_systemui","System UI", hideMenu = false)
@@ -56,10 +54,11 @@ class SystemUIPageForS : BasePage() {
} }
}) })
val layoutCompatibilityBinding = GetDataBinding({ val layoutCompatibilityModeBinding = GetDataBinding({
MIUIActivity.safeSP.getBoolean( MIUIActivity.safeSP.getInt(
"layout_compatibility_mode", false "screen_hole_location",
) 0
) == 2
}) { view, flags, data -> }) { view, flags, data ->
when (flags) { when (flags) {
1 -> (view as Switch).isEnabled = data as Boolean 1 -> (view as Switch).isEnabled = data as Boolean
@@ -67,23 +66,57 @@ class SystemUIPageForS : BasePage() {
} }
} }
TextSummaryWithSwitch( val screenHoleLocation: HashMap<Int, String> = hashMapOf<Int, String>().also {
it[0] = getString(R.string.off)
it[1] = getString(R.string.center)
it[2] = getString(R.string.left_or_right)
}
TextSummaryWithSpinner(
TextSummaryV( TextSummaryV(
textId = R.string.layout_compatibility_mode, tipsId = R.string.layout_compatibility_mode_summary textId = R.string.layout_compatibility_mode,
), SwitchV("layout_compatibility_mode", dataBindingSend = layoutCompatibilityBinding.bindingSend) tipsId = R.string.screen_hole_location
) ),
SpinnerV(
screenHoleLocation[MIUIActivity.safeSP.getInt(
"screen_hole_location",
0
)].toString()
) {
add(screenHoleLocation[0].toString()) {
MIUIActivity.safeSP.putAny("screen_hole_location", 0)
layoutCompatibilityModeBinding.binding.Send().send(false)
}
add(screenHoleLocation[1].toString()) {
MIUIActivity.safeSP.putAny("screen_hole_location", 1)
layoutCompatibilityModeBinding.binding.Send().send(false)
}
add(screenHoleLocation[2].toString()) {
MIUIActivity.safeSP.putAny("screen_hole_location", 2)
layoutCompatibilityModeBinding.binding.Send().send(true)
}
})
Text( Text(
textId = R.string.left_margin, dataBindingRecv = layoutCompatibilityBinding.binding.getRecv(2) textId = R.string.left_margin,
dataBindingRecv = layoutCompatibilityModeBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"status_bar_left_margin", 0, 300, 0, dataBindingRecv = layoutCompatibilityBinding.binding.getRecv(2) "status_bar_left_margin",
0,
300,
0,
dataBindingRecv = layoutCompatibilityModeBinding.binding.getRecv(2)
) )
Text( Text(
textId = R.string.right_margin, dataBindingRecv = layoutCompatibilityBinding.binding.getRecv(2) textId = R.string.right_margin,
dataBindingRecv = layoutCompatibilityModeBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"status_bar_right_margin", 0, 300, 0, dataBindingRecv = layoutCompatibilityBinding.binding.getRecv(2) "status_bar_right_margin",
0,
300,
0,
dataBindingRecv = layoutCompatibilityModeBinding.binding.getRecv(2)
) )
Line() Line()
TitleText(textId = R.string.status_bar_clock_format) TitleText(textId = R.string.status_bar_clock_format)
@@ -212,38 +245,24 @@ class SystemUIPageForS : BasePage() {
//预设模式结束 //预设模式结束
//极客模式起始 //极客模式起始
TextSummaryWithArrow(TextSummaryV(textId = R.string.custom_clock_format_geek) { TextSummaryArrow(TextSummaryV(textId = R.string.custom_clock_format_geek) {
NewDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.custom_clock_format_geek) setTitle(R.string.custom_clock_format_geek)
setEditText( setEditText(MIUIActivity.safeSP.getString("custom_clock_format_geek", "HH:mm:ss"), "", isSingleLine = false)
MIUIActivity.safeSP.getString("custom_clock_format_geek", "HH:mm:ss"), "", isSingleLine = false setLButton(textId = R.string.cancel) {
) dismiss()
Button(getString(R.string.click_to_view_use_cases)) {
val locale = context.resources.configuration.locale
val language = locale.language
if (language.endsWith("zh")) {
val uri = Uri.parse("https://zhuti.designer.xiaomi.com/docs/grammar/#%E6%97%B6%E9%97%B4%E6%97%A5%E6%9C%9F")
val intent = Intent(Intent.ACTION_VIEW, uri)
activity.startActivity(intent)
} else {
val uri = Uri.parse("https://docs.google.com/spreadsheets/d/1ghkT2iFbxB3bT4TKCiKAfmEdGt6kTVKFU3dm4Nz1or8/edit?usp=sharing")
val intent = Intent(Intent.ACTION_VIEW, uri)
activity.startActivity(intent)
} }
} setRButton(textId = R.string.Done) {
Button(getString(R.string.Done)) {
if (getEditText().isNotEmpty()) { if (getEditText().isNotEmpty()) {
try { try {
MIUIActivity.safeSP.putAny("custom_clock_format_geek", getEditText()) MIUIActivity.safeSP.putAny("custom_clock_format_geek", getEditText())
dismiss() dismiss()
return@Button return@setRButton
} catch (_: Throwable) { } catch (_: Throwable) {
} }
} }
Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT).show() Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT)
} .show()
Button(getString(R.string.cancel), cancelStyle = true) {
dismiss()
} }
}.show() }.show()
}, dataBindingRecv = customClockGeekBinding.binding.getRecv(2)) }, dataBindingRecv = customClockGeekBinding.binding.getRecv(2))
@@ -268,7 +287,7 @@ class SystemUIPageForS : BasePage() {
Line() Line()
TitleText(textId = R.string.status_bar_icon) TitleText(textId = R.string.status_bar_icon)
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.hide_icon, textId = R.string.hide_icon,
onClickListener = { showFragment("hide_icon") }) onClickListener = { showFragment("hide_icon") })
@@ -295,7 +314,7 @@ class SystemUIPageForS : BasePage() {
dataBindingSend = customMobileTypeTextBinding.bindingSend dataBindingSend = customMobileTypeTextBinding.bindingSend
) )
) )
TextSummaryWithArrow(TextSummaryV(textId = R.string.custom_mobile_type_text) { TextSummaryArrow(TextSummaryV(textId = R.string.custom_mobile_type_text) {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.custom_mobile_type_text) setTitle(R.string.custom_mobile_type_text)
setEditText(MIUIActivity.safeSP.getString("custom_mobile_type_text", "5G"), "") setEditText(MIUIActivity.safeSP.getString("custom_mobile_type_text", "5G"), "")
@@ -339,7 +358,7 @@ class SystemUIPageForS : BasePage() {
SwitchV("big_mobile_type_icon_bold", true), SwitchV("big_mobile_type_icon_bold", true),
dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2) dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2)
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.big_mobile_type_icon_size, textId = R.string.big_mobile_type_icon_size,
onClickListener = { onClickListener = {
@@ -366,7 +385,7 @@ class SystemUIPageForS : BasePage() {
}.show() }.show()
}), dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2) }), dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2)
) )
TextSummaryWithArrow(TextSummaryV(textId = R.string.big_mobile_type_icon_up_and_down_position) { TextSummaryArrow(TextSummaryV(textId = R.string.big_mobile_type_icon_up_and_down_position) {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.big_mobile_type_icon_up_and_down_position) setTitle(R.string.big_mobile_type_icon_up_and_down_position)
setMessage("${activity.getString(R.string.range)} -15~15") setMessage("${activity.getString(R.string.range)} -15~15")
@@ -399,7 +418,7 @@ class SystemUIPageForS : BasePage() {
} }
}.show() }.show()
}, dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2)) }, dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2))
TextSummaryWithArrow(TextSummaryV(textId = R.string.big_mobile_type_icon_left_and_right_margins) { TextSummaryArrow(TextSummaryV(textId = R.string.big_mobile_type_icon_left_and_right_margins) {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.big_mobile_type_icon_left_and_right_margins) setTitle(R.string.big_mobile_type_icon_left_and_right_margins)
setMessage("${activity.getString(R.string.range)} 0~30") setMessage("${activity.getString(R.string.range)} 0~30")
@@ -436,7 +455,7 @@ class SystemUIPageForS : BasePage() {
SeekBarWithText("maximum_number_of_notification_icons", 1, 30, 3) SeekBarWithText("maximum_number_of_notification_icons", 1, 30, 3)
Text(textId = R.string.maximum_number_of_notification_dots) Text(textId = R.string.maximum_number_of_notification_dots)
SeekBarWithText("maximum_number_of_notification_dots", 0, 4, 3) SeekBarWithText("maximum_number_of_notification_dots", 0, 4, 3)
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.battery_percentage_font_size, textId = R.string.battery_percentage_font_size,
onClickListener = { onClickListener = {

View File

@@ -66,7 +66,7 @@ class AndroidPageForT : BasePage() {
tipsId = R.string.remove_small_window_restrictions_summary tipsId = R.string.remove_small_window_restrictions_summary
), SwitchV("remove_small_window_restrictions") ), SwitchV("remove_small_window_restrictions")
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.max_wallpaper_scale, textId = R.string.max_wallpaper_scale,
onClickListener = { onClickListener = {

View File

@@ -35,7 +35,7 @@ class MainPageForT : BasePage() {
) )
}) })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.matters_needing_attention, textId = R.string.matters_needing_attention,
colorId = R.color.red, colorId = R.color.red,
@@ -51,19 +51,19 @@ class MainPageForT : BasePage() {
) )
Line() Line()
TitleText(textId = R.string.scope) TitleText(textId = R.string.scope)
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.scope_systemui, textId = R.string.scope_systemui,
tipsId = R.string.scope_systemui_summary, tipsId = R.string.scope_systemui_summary,
onClickListener = { showFragment("scope_systemui") }) onClickListener = { showFragment("scope_systemui") })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.scope_android, textId = R.string.scope_android,
tipsId = R.string.scope_android_summary, tipsId = R.string.scope_android_summary,
onClickListener = { showFragment("scope_android") }) onClickListener = { showFragment("scope_android") })
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.scope_other, textId = R.string.scope_other,
tipsId = R.string.scope_other_summary, tipsId = R.string.scope_other_summary,
@@ -71,7 +71,7 @@ class MainPageForT : BasePage() {
) )
Line() Line()
TitleText(textId = R.string.about) TitleText(textId = R.string.about)
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.about_module, textId = R.string.about_module,
tips = getString(R.string.about_module_summary), tips = getString(R.string.about_module_summary),

View File

@@ -2,6 +2,7 @@ package com.lt2333.simplicitytools.activity.pages.t
import android.content.ComponentName import android.content.ComponentName
import android.content.Intent import android.content.Intent
import android.content.pm.PackageManager
import android.view.View import android.view.View
import android.widget.Switch import android.widget.Switch
import android.widget.Toast import android.widget.Toast
@@ -10,6 +11,8 @@ import cn.fkj233.ui.activity.annotation.BMPage
import cn.fkj233.ui.activity.data.BasePage import cn.fkj233.ui.activity.data.BasePage
import cn.fkj233.ui.activity.view.SwitchV import cn.fkj233.ui.activity.view.SwitchV
import cn.fkj233.ui.activity.view.TextSummaryV import cn.fkj233.ui.activity.view.TextSummaryV
import cn.fkj233.ui.dialog.MIUIDialog
import com.lt2333.simplicitytools.BuildConfig
import com.lt2333.simplicitytools.R import com.lt2333.simplicitytools.R
@@ -30,24 +33,6 @@ class OtherPageForT : BasePage() {
tipsId = R.string.home_double_tap_to_sleep_summary tipsId = R.string.home_double_tap_to_sleep_summary
), SwitchV("double_tap_to_sleep") ), SwitchV("double_tap_to_sleep")
) )
TextSummaryWithSwitch(
TextSummaryV(
textId = R.string.miuihome_recentwiew_wallpaper_darkening, tipsId = R.string.miuihome_recentwiew_wallpaper_darkening_summary
), SwitchV("miuihome_recentwiew_wallpaper_darkening", false)
)
TextSummaryWithSwitch(
TextSummaryV(
textId = R.string.miuihome_recentview_remove_card_animation, tipsId = R.string.miuihome_recentview_remove_card_animation_summary
), SwitchV("miuihome_recentview_remove_card_animation", false)
)
TextSummaryWithSwitch(
TextSummaryV(textId = R.string.miuihome_shortcut_add_small_window, tipsId = R.string.miuihome_shortcut_add_small_window_summary),
SwitchV("miuihome_shortcut_add_small_window", false)
)
TextSummaryWithSwitch(
TextSummaryV(textId = R.string.miuihome_scroll_icon_name, tipsId = R.string.miuihome_scroll_icon_name_summary),
SwitchV("miuihome_scroll_icon_name", false)
)
Line() Line()
TitleText(textId = R.string.scope_powerkeeper) TitleText(textId = R.string.scope_powerkeeper)
TextSummaryWithSwitch( TextSummaryWithSwitch(
@@ -97,7 +82,7 @@ class OtherPageForT : BasePage() {
SwitchV("make_millet_ignore_active"), SwitchV("make_millet_ignore_active"),
dataBindingRecv = makeMilletMoreAggressiveSwitchBinding.binding.getRecv(2) dataBindingRecv = makeMilletMoreAggressiveSwitchBinding.binding.getRecv(2)
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV( TextSummaryV(
textId = R.string.battery_optimization, textId = R.string.battery_optimization,
tipsId = R.string.battery_optimization_summary, tipsId = R.string.battery_optimization_summary,

View File

@@ -1,7 +1,5 @@
package com.lt2333.simplicitytools.activity.pages.t package com.lt2333.simplicitytools.activity.pages.t
import android.content.Intent
import android.net.Uri
import android.view.View import android.view.View
import android.widget.Switch import android.widget.Switch
import android.widget.Toast import android.widget.Toast
@@ -13,16 +11,18 @@ import cn.fkj233.ui.activity.view.SwitchV
import cn.fkj233.ui.activity.view.TextSummaryV import cn.fkj233.ui.activity.view.TextSummaryV
import cn.fkj233.ui.activity.view.TextV import cn.fkj233.ui.activity.view.TextV
import cn.fkj233.ui.dialog.MIUIDialog import cn.fkj233.ui.dialog.MIUIDialog
import cn.fkj233.ui.dialog.NewDialog
import com.lt2333.simplicitytools.R import com.lt2333.simplicitytools.R
import java.util.HashMap
@BMPage("scope_systemui", "System UI", hideMenu = false) class SystemUIPageForT : BasePage() { @BMPage("scope_systemui","System UI", hideMenu = false)
class SystemUIPageForT : BasePage() {
override fun onCreate() { override fun onCreate() {
TitleText(textId = R.string.statusbar) TitleText(textId = R.string.statusbar)
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV(textId = R.string.double_tap_to_sleep), SwitchV("status_bar_double_tap_to_sleep") TextSummaryV(textId = R.string.double_tap_to_sleep),
SwitchV("status_bar_double_tap_to_sleep")
) )
Line() Line()
TitleText(textId = R.string.status_bar_layout) TitleText(textId = R.string.status_bar_layout)
@@ -32,9 +32,12 @@ import com.lt2333.simplicitytools.R
it[2] = getString(R.string.clock_right) it[2] = getString(R.string.clock_right)
it[3] = getString(R.string.clock_center_and_icon_left) it[3] = getString(R.string.clock_center_and_icon_left)
} }
TextWithSpinner(TextV(textId = R.string.status_bar_layout_mode), SpinnerV( TextWithSpinner(
TextV(textId = R.string.status_bar_layout_mode),
SpinnerV(
statusBarLayoutMode[MIUIActivity.safeSP.getInt( statusBarLayoutMode[MIUIActivity.safeSP.getInt(
"status_bar_layout_mode", 0 "status_bar_layout_mode",
0
)].toString() )].toString()
) { ) {
add(statusBarLayoutMode[0].toString()) { add(statusBarLayoutMode[0].toString()) {
@@ -51,10 +54,11 @@ import com.lt2333.simplicitytools.R
} }
}) })
val layoutCompatibilityBinding = GetDataBinding({ val layoutCompatibilityModeBinding = GetDataBinding({
MIUIActivity.safeSP.getBoolean( MIUIActivity.safeSP.getInt(
"layout_compatibility_mode", false "screen_hole_location",
) 0
) == 2
}) { view, flags, data -> }) { view, flags, data ->
when (flags) { when (flags) {
1 -> (view as Switch).isEnabled = data as Boolean 1 -> (view as Switch).isEnabled = data as Boolean
@@ -62,23 +66,57 @@ import com.lt2333.simplicitytools.R
} }
} }
TextSummaryWithSwitch( val screenHoleLocation: HashMap<Int, String> = hashMapOf<Int, String>().also {
it[0] = getString(R.string.off)
it[1] = getString(R.string.center)
it[2] = getString(R.string.left_or_right)
}
TextSummaryWithSpinner(
TextSummaryV( TextSummaryV(
textId = R.string.layout_compatibility_mode, tipsId = R.string.layout_compatibility_mode_summary textId = R.string.layout_compatibility_mode,
), SwitchV("layout_compatibility_mode", dataBindingSend = layoutCompatibilityBinding.bindingSend) tipsId = R.string.screen_hole_location
) ),
SpinnerV(
screenHoleLocation[MIUIActivity.safeSP.getInt(
"screen_hole_location",
0
)].toString()
) {
add(screenHoleLocation[0].toString()) {
MIUIActivity.safeSP.putAny("screen_hole_location", 0)
layoutCompatibilityModeBinding.binding.Send().send(false)
}
add(screenHoleLocation[1].toString()) {
MIUIActivity.safeSP.putAny("screen_hole_location", 1)
layoutCompatibilityModeBinding.binding.Send().send(false)
}
add(screenHoleLocation[2].toString()) {
MIUIActivity.safeSP.putAny("screen_hole_location", 2)
layoutCompatibilityModeBinding.binding.Send().send(true)
}
})
Text( Text(
textId = R.string.left_margin, dataBindingRecv = layoutCompatibilityBinding.binding.getRecv(2) textId = R.string.left_margin,
dataBindingRecv = layoutCompatibilityModeBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"status_bar_left_margin", 0, 300, 0, dataBindingRecv = layoutCompatibilityBinding.binding.getRecv(2) "status_bar_left_margin",
0,
300,
0,
dataBindingRecv = layoutCompatibilityModeBinding.binding.getRecv(2)
) )
Text( Text(
textId = R.string.right_margin, dataBindingRecv = layoutCompatibilityBinding.binding.getRecv(2) textId = R.string.right_margin,
dataBindingRecv = layoutCompatibilityModeBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"status_bar_right_margin", 0, 300, 0, dataBindingRecv = layoutCompatibilityBinding.binding.getRecv(2) "status_bar_right_margin",
0,
300,
0,
dataBindingRecv = layoutCompatibilityModeBinding.binding.getRecv(2)
) )
Line() Line()
TitleText(textId = R.string.status_bar_clock_format) TitleText(textId = R.string.status_bar_clock_format)
@@ -86,7 +124,8 @@ import com.lt2333.simplicitytools.R
val customClockPresetBinding = GetDataBinding({ val customClockPresetBinding = GetDataBinding({
MIUIActivity.safeSP.getInt( MIUIActivity.safeSP.getInt(
"custom_clock_mode", 0 "custom_clock_mode",
0
) == 1 ) == 1
}) { view, flags, data -> }) { view, flags, data ->
when (flags) { when (flags) {
@@ -95,7 +134,8 @@ import com.lt2333.simplicitytools.R
} }
} }
val customClockGeekBinding = GetDataBinding({ MIUIActivity.safeSP.getInt("custom_clock_mode", 0) == 2 } val customClockGeekBinding =
GetDataBinding({ MIUIActivity.safeSP.getInt("custom_clock_mode", 0) == 2 }
) { view, flags, data -> ) { view, flags, data ->
when (flags) { when (flags) {
@@ -109,11 +149,9 @@ import com.lt2333.simplicitytools.R
it[1] = getString(R.string.preset) it[1] = getString(R.string.preset)
it[2] = getString(R.string.geek) it[2] = getString(R.string.geek)
} }
TextWithSpinner(TextV(textId = R.string.custom_clock_mode), SpinnerV( TextWithSpinner(
customClockMode[MIUIActivity.safeSP.getInt( TextV(textId = R.string.custom_clock_mode),
"custom_clock_mode", 0 SpinnerV(customClockMode[MIUIActivity.safeSP.getInt("custom_clock_mode", 0)].toString()) {
)].toString()
) {
add(customClockMode[0].toString()) { add(customClockMode[0].toString()) {
MIUIActivity.safeSP.putAny("custom_clock_mode", 0) MIUIActivity.safeSP.putAny("custom_clock_mode", 0)
customClockPresetBinding.binding.Send().send(false) customClockPresetBinding.binding.Send().send(false)
@@ -183,53 +221,48 @@ import com.lt2333.simplicitytools.R
dataBindingRecv = customClockPresetBinding.binding.getRecv(2) dataBindingRecv = customClockPresetBinding.binding.getRecv(2)
) )
Text( Text(
textId = R.string.status_bar_clock_size, dataBindingRecv = customClockPresetBinding.binding.getRecv(2) textId = R.string.status_bar_clock_size,
dataBindingRecv = customClockPresetBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"status_bar_clock_size", 0, 18, 0, dataBindingRecv = customClockPresetBinding.binding.getRecv(2) "status_bar_clock_size",
0,
18,
0,
dataBindingRecv = customClockPresetBinding.binding.getRecv(2)
) )
Text( Text(
textId = R.string.status_bar_clock_double_line_size, textId = R.string.status_bar_clock_double_line_size,
dataBindingRecv = customClockPresetBinding.binding.getRecv(2) dataBindingRecv = customClockPresetBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"status_bar_clock_double_line_size", 0, 9, 0, dataBindingRecv = customClockPresetBinding.binding.getRecv(2) "status_bar_clock_double_line_size",
0,
9,
0,
dataBindingRecv = customClockPresetBinding.binding.getRecv(2)
) )
//预设模式结束 //预设模式结束
//极客模式起始 //极客模式起始
TextSummaryWithArrow(TextSummaryV(textId = R.string.custom_clock_format_geek) { TextSummaryArrow(TextSummaryV(textId = R.string.custom_clock_format_geek) {
NewDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.custom_clock_format_geek) setTitle(R.string.custom_clock_format_geek)
setEditText( setEditText(MIUIActivity.safeSP.getString("custom_clock_format_geek", "HH:mm:ss"), "", isSingleLine = false)
MIUIActivity.safeSP.getString("custom_clock_format_geek", "HH:mm:ss"), "", isSingleLine = false setLButton(textId = R.string.cancel) {
) dismiss()
Button(getString(R.string.click_to_view_use_cases)) {
val locale = context.resources.configuration.locale
val language = locale.language
if (language.endsWith("zh")) {
val uri = Uri.parse("https://zhuti.designer.xiaomi.com/docs/grammar/#%E6%97%B6%E9%97%B4%E6%97%A5%E6%9C%9F")
val intent = Intent(Intent.ACTION_VIEW, uri)
activity.startActivity(intent)
} else {
val uri = Uri.parse("https://docs.google.com/spreadsheets/d/1ghkT2iFbxB3bT4TKCiKAfmEdGt6kTVKFU3dm4Nz1or8/edit?usp=sharing")
val intent = Intent(Intent.ACTION_VIEW, uri)
activity.startActivity(intent)
} }
} setRButton(textId = R.string.Done) {
Button(getString(R.string.Done)) {
if (getEditText().isNotEmpty()) { if (getEditText().isNotEmpty()) {
try { try {
MIUIActivity.safeSP.putAny("custom_clock_format_geek", getEditText()) MIUIActivity.safeSP.putAny("custom_clock_format_geek", getEditText())
dismiss() dismiss()
return@Button return@setRButton
} catch (_: Throwable) { } catch (_: Throwable) {
} }
} }
Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT).show() Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT)
} .show()
Button(getString(R.string.cancel), cancelStyle = true) {
dismiss()
} }
}.show() }.show()
}, dataBindingRecv = customClockGeekBinding.binding.getRecv(2)) }, dataBindingRecv = customClockGeekBinding.binding.getRecv(2))
@@ -239,25 +272,34 @@ import com.lt2333.simplicitytools.R
dataBindingRecv = customClockGeekBinding.binding.getRecv(2) dataBindingRecv = customClockGeekBinding.binding.getRecv(2)
) )
Text( Text(
textId = R.string.status_bar_clock_size, dataBindingRecv = customClockGeekBinding.binding.getRecv(2) textId = R.string.status_bar_clock_size,
dataBindingRecv = customClockGeekBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"status_bar_clock_size_geek", 0, 18, 0, dataBindingRecv = customClockGeekBinding.binding.getRecv(2) "status_bar_clock_size_geek",
0,
18,
0,
dataBindingRecv = customClockGeekBinding.binding.getRecv(2)
) )
//极客模式结束 //极客模式结束
Line() Line()
TitleText(textId = R.string.status_bar_icon) TitleText(textId = R.string.status_bar_icon)
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV(textId = R.string.hide_icon, onClickListener = { showFragment("hide_icon") }) TextSummaryV(
textId = R.string.hide_icon,
onClickListener = { showFragment("hide_icon") })
) )
TextWithSwitch( TextWithSwitch(
TextV(textId = R.string.show_wifi_standard), SwitchV("show_wifi_standard") TextV(textId = R.string.show_wifi_standard),
SwitchV("show_wifi_standard")
) )
val customMobileTypeTextBinding = GetDataBinding({ val customMobileTypeTextBinding = GetDataBinding({
MIUIActivity.safeSP.getBoolean( MIUIActivity.safeSP.getBoolean(
"custom_mobile_type_text_switch", false "custom_mobile_type_text_switch",
false
) )
}) { view, flags, data -> }) { view, flags, data ->
when (flags) { when (flags) {
@@ -266,11 +308,13 @@ import com.lt2333.simplicitytools.R
} }
} }
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV(textId = R.string.custom_mobile_type_text_switch), SwitchV( TextSummaryV(textId = R.string.custom_mobile_type_text_switch),
"custom_mobile_type_text_switch", dataBindingSend = customMobileTypeTextBinding.bindingSend SwitchV(
"custom_mobile_type_text_switch",
dataBindingSend = customMobileTypeTextBinding.bindingSend
) )
) )
TextSummaryWithArrow(TextSummaryV(textId = R.string.custom_mobile_type_text) { TextSummaryArrow(TextSummaryV(textId = R.string.custom_mobile_type_text) {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.custom_mobile_type_text) setTitle(R.string.custom_mobile_type_text)
setEditText(MIUIActivity.safeSP.getString("custom_mobile_type_text", "5G"), "") setEditText(MIUIActivity.safeSP.getString("custom_mobile_type_text", "5G"), "")
@@ -286,13 +330,15 @@ import com.lt2333.simplicitytools.R
} catch (_: Throwable) { } catch (_: Throwable) {
} }
} }
Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT).show() Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT)
.show()
} }
}.show() }.show()
}, dataBindingRecv = customMobileTypeTextBinding.binding.getRecv(2)) }, dataBindingRecv = customMobileTypeTextBinding.binding.getRecv(2))
val bigMobileTypeIconBinding = GetDataBinding({ val bigMobileTypeIconBinding = GetDataBinding({
MIUIActivity.safeSP.getBoolean( MIUIActivity.safeSP.getBoolean(
"big_mobile_type_icon", false "big_mobile_type_icon",
false
) )
}) { view, flags, data -> }) { view, flags, data ->
when (flags) { when (flags) {
@@ -301,44 +347,26 @@ import com.lt2333.simplicitytools.R
} }
} }
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV(textId = R.string.big_mobile_type_icon), SwitchV( TextSummaryV(textId = R.string.big_mobile_type_icon),
"big_mobile_type_icon", dataBindingSend = bigMobileTypeIconBinding.bindingSend SwitchV(
"big_mobile_type_icon",
dataBindingSend = bigMobileTypeIconBinding.bindingSend
) )
) )
val bigMobileTypeLocation: HashMap<Int, String> = hashMapOf<Int, String>().also {
it[0] = getString(R.string.left)
it[1] = getString(R.string.right)
}
TextWithSpinner(
TextV(textId = R.string.big_mobile_type_location), SpinnerV(
bigMobileTypeLocation[MIUIActivity.safeSP.getInt(
"big_mobile_type_location", 1
)].toString()
) {
add(bigMobileTypeLocation[0].toString()) {
MIUIActivity.safeSP.putAny("big_mobile_type_location", 0)
}
add(bigMobileTypeLocation[1].toString()) {
MIUIActivity.safeSP.putAny("big_mobile_type_location", 1)
}
}, dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2)
)
TextSummaryWithSwitch(
TextSummaryV(textId = R.string.big_mobile_type_only_show_network_card),
SwitchV("big_mobile_type_only_show_network_card", false),
dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2)
)
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV(textId = R.string.big_mobile_type_icon_bold), TextSummaryV(textId = R.string.big_mobile_type_icon_bold),
SwitchV("big_mobile_type_icon_bold", true), SwitchV("big_mobile_type_icon_bold", true),
dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2) dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2)
) )
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV(textId = R.string.big_mobile_type_icon_size, onClickListener = { TextSummaryV(
textId = R.string.big_mobile_type_icon_size,
onClickListener = {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.big_mobile_type_icon_size) setTitle(R.string.big_mobile_type_icon_size)
setEditText( setEditText(
"", "${activity.getString(R.string.def)}12.5, ${activity.getString(R.string.current)}${ "",
"${activity.getString(R.string.def)}12.5, ${activity.getString(R.string.current)}${
MIUIActivity.safeSP.getFloat("big_mobile_type_icon_size", 12.5f) MIUIActivity.safeSP.getFloat("big_mobile_type_icon_size", 12.5f)
}" }"
) )
@@ -348,7 +376,8 @@ import com.lt2333.simplicitytools.R
setRButton(textId = R.string.Done) { setRButton(textId = R.string.Done) {
if (getEditText() != "") { if (getEditText() != "") {
MIUIActivity.safeSP.putAny( MIUIActivity.safeSP.putAny(
"big_mobile_type_icon_size", getEditText().toFloat() "big_mobile_type_icon_size",
getEditText().toFloat()
) )
} }
dismiss() dismiss()
@@ -356,12 +385,13 @@ import com.lt2333.simplicitytools.R
}.show() }.show()
}), dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2) }), dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2)
) )
TextSummaryWithArrow(TextSummaryV(textId = R.string.big_mobile_type_icon_up_and_down_position) { TextSummaryArrow(TextSummaryV(textId = R.string.big_mobile_type_icon_up_and_down_position) {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.big_mobile_type_icon_up_and_down_position) setTitle(R.string.big_mobile_type_icon_up_and_down_position)
setMessage("${activity.getString(R.string.range)} -15~15") setMessage("${activity.getString(R.string.range)} -15~15")
setEditText( setEditText(
"", "${activity.getString(R.string.def)}0, ${activity.getString(R.string.current)}${ "",
"${activity.getString(R.string.def)}0, ${activity.getString(R.string.current)}${
MIUIActivity.safeSP.getInt("big_mobile_type_icon_up_and_down_position", 0) MIUIActivity.safeSP.getInt("big_mobile_type_icon_up_and_down_position", 0)
}" }"
) )
@@ -374,7 +404,8 @@ import com.lt2333.simplicitytools.R
val value = getEditText().toInt() val value = getEditText().toInt()
if (value in (-15..15)) { if (value in (-15..15)) {
MIUIActivity.safeSP.putAny( MIUIActivity.safeSP.putAny(
"big_mobile_type_icon_up_and_down_position", value "big_mobile_type_icon_up_and_down_position",
value
) )
dismiss() dismiss()
return@setRButton return@setRButton
@@ -382,16 +413,18 @@ import com.lt2333.simplicitytools.R
} catch (_: Throwable) { } catch (_: Throwable) {
} }
} }
Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT).show() Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT)
.show()
} }
}.show() }.show()
}, dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2)) }, dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2))
TextSummaryWithArrow(TextSummaryV(textId = R.string.big_mobile_type_icon_left_and_right_margins) { TextSummaryArrow(TextSummaryV(textId = R.string.big_mobile_type_icon_left_and_right_margins) {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.big_mobile_type_icon_left_and_right_margins) setTitle(R.string.big_mobile_type_icon_left_and_right_margins)
setMessage("${activity.getString(R.string.range)} 0~30") setMessage("${activity.getString(R.string.range)} 0~30")
setEditText( setEditText(
"", "${activity.getString(R.string.def)}0, ${activity.getString(R.string.current)}${ "",
"${activity.getString(R.string.def)}0, ${activity.getString(R.string.current)}${
MIUIActivity.safeSP.getInt("big_mobile_type_icon_left_and_right_margins", 0) MIUIActivity.safeSP.getInt("big_mobile_type_icon_left_and_right_margins", 0)
}" }"
) )
@@ -404,7 +437,8 @@ import com.lt2333.simplicitytools.R
val value = getEditText().toInt() val value = getEditText().toInt()
if (value in (0..30)) { if (value in (0..30)) {
MIUIActivity.safeSP.putAny( MIUIActivity.safeSP.putAny(
"big_mobile_type_icon_left_and_right_margins", value "big_mobile_type_icon_left_and_right_margins",
value
) )
dismiss() dismiss()
return@setRButton return@setRButton
@@ -412,7 +446,8 @@ import com.lt2333.simplicitytools.R
} catch (_: Throwable) { } catch (_: Throwable) {
} }
} }
Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT).show() Toast.makeText(activity, R.string.input_error, Toast.LENGTH_SHORT)
.show()
} }
}.show() }.show()
}, dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2)) }, dataBindingRecv = bigMobileTypeIconBinding.binding.getRecv(2))
@@ -420,8 +455,10 @@ import com.lt2333.simplicitytools.R
SeekBarWithText("maximum_number_of_notification_icons", 1, 30, 3) SeekBarWithText("maximum_number_of_notification_icons", 1, 30, 3)
Text(textId = R.string.maximum_number_of_notification_dots) Text(textId = R.string.maximum_number_of_notification_dots)
SeekBarWithText("maximum_number_of_notification_dots", 0, 4, 3) SeekBarWithText("maximum_number_of_notification_dots", 0, 4, 3)
TextSummaryWithArrow( TextSummaryArrow(
TextSummaryV(textId = R.string.battery_percentage_font_size, onClickListener = { TextSummaryV(
textId = R.string.battery_percentage_font_size,
onClickListener = {
MIUIDialog(activity) { MIUIDialog(activity) {
setTitle(R.string.battery_percentage_font_size) setTitle(R.string.battery_percentage_font_size)
setMessage(R.string.zero_do_no_change) setMessage(R.string.zero_do_no_change)
@@ -436,7 +473,8 @@ import com.lt2333.simplicitytools.R
setRButton(textId = R.string.Done) { setRButton(textId = R.string.Done) {
if (getEditText() != "") { if (getEditText() != "") {
MIUIActivity.safeSP.putAny( MIUIActivity.safeSP.putAny(
"battery_percentage_font_size", getEditText().toFloat() "battery_percentage_font_size",
getEditText().toFloat()
) )
} }
dismiss() dismiss()
@@ -446,7 +484,8 @@ import com.lt2333.simplicitytools.R
) )
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV( TextSummaryV(
textId = R.string.hide_battery_percentage_icon, tipsId = R.string.hide_battery_percentage_icon_summary textId = R.string.hide_battery_percentage_icon,
tipsId = R.string.hide_battery_percentage_icon_summary
), SwitchV("hide_battery_percentage_icon") ), SwitchV("hide_battery_percentage_icon")
) )
Line() Line()
@@ -464,11 +503,13 @@ import com.lt2333.simplicitytools.R
), SwitchV("hide_status_bar_network_speed_second") ), SwitchV("hide_status_bar_network_speed_second")
) )
TextWithSwitch( TextWithSwitch(
TextV(textId = R.string.hide_network_speed_splitter), SwitchV("hide_network_speed_splitter") TextV(textId = R.string.hide_network_speed_splitter),
SwitchV("hide_network_speed_splitter")
) )
val statusBarDualRowNetworkSpeedBinding = GetDataBinding({ val statusBarDualRowNetworkSpeedBinding = GetDataBinding({
MIUIActivity.safeSP.getBoolean( MIUIActivity.safeSP.getBoolean(
"status_bar_dual_row_network_speed", false "status_bar_dual_row_network_speed",
false
) )
}) { view, flags, data -> }) { view, flags, data ->
when (flags) { when (flags) {
@@ -480,17 +521,21 @@ import com.lt2333.simplicitytools.R
TextSummaryV( TextSummaryV(
textId = R.string.status_bar_dual_row_network_speed, textId = R.string.status_bar_dual_row_network_speed,
tipsId = R.string.status_bar_dual_row_network_speed_summary tipsId = R.string.status_bar_dual_row_network_speed_summary
), SwitchV( ),
"status_bar_dual_row_network_speed", dataBindingSend = statusBarDualRowNetworkSpeedBinding.bindingSend SwitchV(
"status_bar_dual_row_network_speed",
dataBindingSend = statusBarDualRowNetworkSpeedBinding.bindingSend
) )
) )
val align: HashMap<Int, String> = hashMapOf() val align: HashMap<Int, String> = hashMapOf()
align[0] = getString(R.string.left) align[0] = getString(R.string.left)
align[1] = getString(R.string.right) align[1] = getString(R.string.right)
TextWithSpinner( TextWithSpinner(
TextV(textId = R.string.status_bar_network_speed_dual_row_gravity), SpinnerV( TextV(textId = R.string.status_bar_network_speed_dual_row_gravity),
SpinnerV(
align[MIUIActivity.safeSP.getInt( align[MIUIActivity.safeSP.getInt(
"status_bar_network_speed_dual_row_gravity", 0 "status_bar_network_speed_dual_row_gravity",
0
)].toString() )].toString()
) { ) {
add(align[0].toString()) { add(align[0].toString()) {
@@ -500,16 +545,21 @@ import com.lt2333.simplicitytools.R
MIUIActivity.safeSP.putAny("status_bar_network_speed_dual_row_gravity", 1) MIUIActivity.safeSP.putAny("status_bar_network_speed_dual_row_gravity", 1)
} }
}, dataBindingRecv = statusBarDualRowNetworkSpeedBinding.binding.getRecv(2) },
dataBindingRecv = statusBarDualRowNetworkSpeedBinding.binding.getRecv(2)
) )
TextWithSpinner(TextV(textId = R.string.status_bar_network_speed_dual_row_icon), SpinnerV( TextWithSpinner(
TextV(textId = R.string.status_bar_network_speed_dual_row_icon),
SpinnerV(
MIUIActivity.safeSP.getString( MIUIActivity.safeSP.getString(
"status_bar_network_speed_dual_row_icon", getString(R.string.none) "status_bar_network_speed_dual_row_icon",
getString(R.string.none)
) )
) { ) {
add(getString(R.string.none)) { add(getString(R.string.none)) {
MIUIActivity.safeSP.putAny( MIUIActivity.safeSP.putAny(
"status_bar_network_speed_dual_row_icon", getString(R.string.none) "status_bar_network_speed_dual_row_icon",
getString(R.string.none)
) )
} }
add("▲▼") { add("▲▼") {
@@ -537,7 +587,8 @@ import com.lt2333.simplicitytools.R
TitleText(textId = R.string.notification_center) TitleText(textId = R.string.notification_center)
val showWeatherMainSwitchBinding = GetDataBinding({ val showWeatherMainSwitchBinding = GetDataBinding({
MIUIActivity.safeSP.getBoolean( MIUIActivity.safeSP.getBoolean(
"notification_weather", false "notification_weather",
false
) )
}) { view, flags, data -> }) { view, flags, data ->
when (flags) { when (flags) {
@@ -547,15 +598,20 @@ import com.lt2333.simplicitytools.R
} }
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV( TextSummaryV(
textId = R.string.show_weather_main_switch, colorId = R.color.blue textId = R.string.show_weather_main_switch,
), SwitchV( colorId = R.color.blue
"notification_weather", dataBindingSend = showWeatherMainSwitchBinding.bindingSend ),
SwitchV(
"notification_weather",
dataBindingSend = showWeatherMainSwitchBinding.bindingSend
) )
) )
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV( TextSummaryV(
textId = R.string.show_city, textId = R.string.show_city,
), SwitchV("notification_weather_city"), dataBindingRecv = showWeatherMainSwitchBinding.binding.getRecv(2) ),
SwitchV("notification_weather_city"),
dataBindingRecv = showWeatherMainSwitchBinding.binding.getRecv(2)
) )
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV( TextSummaryV(
@@ -566,16 +622,10 @@ import com.lt2333.simplicitytools.R
) )
Line() Line()
TitleText(textId = R.string.control_center) TitleText(textId = R.string.control_center)
TextSummaryWithSwitch(
TextSummaryV(
textId = R.string.disable_bluetooth_temporarily_off
), SwitchV(
"disable_bluetooth_temporarily_off"
)
)
val controlCenterWeatherBinding = GetDataBinding({ val controlCenterWeatherBinding = GetDataBinding({
MIUIActivity.safeSP.getBoolean( MIUIActivity.safeSP.getBoolean(
"control_center_weather", false "control_center_weather",
false
) )
}) { view, flags, data -> }) { view, flags, data ->
when (flags) { when (flags) {
@@ -588,14 +638,18 @@ import com.lt2333.simplicitytools.R
textId = R.string.show_weather_main_switch, textId = R.string.show_weather_main_switch,
colorId = R.color.blue, colorId = R.color.blue,
tipsId = R.string.control_center_weather_summary tipsId = R.string.control_center_weather_summary
), SwitchV( ),
"control_center_weather", dataBindingSend = controlCenterWeatherBinding.bindingSend SwitchV(
"control_center_weather",
dataBindingSend = controlCenterWeatherBinding.bindingSend
) )
) )
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV( TextSummaryV(
textId = R.string.show_city, textId = R.string.show_city,
), SwitchV("control_center_weather_city"), dataBindingRecv = controlCenterWeatherBinding.binding.getRecv(2) ),
SwitchV("control_center_weather_city"),
dataBindingRecv = controlCenterWeatherBinding.binding.getRecv(2)
) )
Line() Line()
TitleText(textId = R.string.lock_screen) TitleText(textId = R.string.lock_screen)
@@ -618,7 +672,8 @@ import com.lt2333.simplicitytools.R
), SwitchV("remove_lock_screen_camera") ), SwitchV("remove_lock_screen_camera")
) )
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV(textId = R.string.enable_wave_charge_animation), SwitchV("enable_wave_charge_animation") TextSummaryV(textId = R.string.enable_wave_charge_animation),
SwitchV("enable_wave_charge_animation")
) )
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV( TextSummaryV(
@@ -628,14 +683,16 @@ import com.lt2333.simplicitytools.R
) )
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV( TextSummaryV(
textId = R.string.double_tap_to_sleep, tipsId = R.string.home_double_tap_to_sleep_summary textId = R.string.double_tap_to_sleep,
tipsId = R.string.home_double_tap_to_sleep_summary
), SwitchV("lock_screen_double_tap_to_sleep") ), SwitchV("lock_screen_double_tap_to_sleep")
) )
Line() Line()
TitleText(textId = R.string.old_quick_settings_panel) TitleText(textId = R.string.old_quick_settings_panel)
val oldQSCustomSwitchBinding = GetDataBinding({ val oldQSCustomSwitchBinding = GetDataBinding({
MIUIActivity.safeSP.getBoolean( MIUIActivity.safeSP.getBoolean(
"old_qs_custom_switch", false "old_qs_custom_switch",
false
) )
}) { view, flags, data -> }) { view, flags, data ->
when (flags) { when (flags) {
@@ -645,35 +702,57 @@ import com.lt2333.simplicitytools.R
} }
TextSummaryWithSwitch( TextSummaryWithSwitch(
TextSummaryV( TextSummaryV(
textId = R.string.old_qs_custom_switch, colorId = R.color.blue textId = R.string.old_qs_custom_switch,
), SwitchV( colorId = R.color.blue
"old_qs_custom_switch", dataBindingSend = oldQSCustomSwitchBinding.bindingSend ),
SwitchV(
"old_qs_custom_switch",
dataBindingSend = oldQSCustomSwitchBinding.bindingSend
) )
) )
Text( Text(
textId = R.string.qs_custom_rows, dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2) textId = R.string.qs_custom_rows,
dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"qs_custom_rows", 1, 6, 3, dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2) "qs_custom_rows",
1,
6,
3,
dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2)
) )
Text( Text(
textId = R.string.qs_custom_rows_horizontal, dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2) textId = R.string.qs_custom_rows_horizontal,
dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"qs_custom_rows_horizontal", 1, 3, 2, dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2) "qs_custom_rows_horizontal",
1,
3,
2,
dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2)
) )
Text( Text(
textId = R.string.qs_custom_columns, dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2) textId = R.string.qs_custom_columns,
dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"qs_custom_columns", 1, 7, 4, dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2) "qs_custom_columns",
1,
7,
4,
dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2)
) )
Text( Text(
textId = R.string.qs_custom_columns_unexpanded, textId = R.string.qs_custom_columns_unexpanded,
dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2) dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2)
) )
SeekBarWithText( SeekBarWithText(
"qs_custom_columns_unexpanded", 1, 7, 5, dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2) "qs_custom_columns_unexpanded",
1,
7,
5,
dataBindingRecv = oldQSCustomSwitchBinding.binding.getRecv(2)
) )
} }

View File

@@ -5,9 +5,7 @@ import com.lt2333.simplicitytools.hooks.rules.all.android.AllowUntrustedTouchesF
import com.lt2333.simplicitytools.hooks.rules.all.android.DeleteOnPostNotificationForAll import com.lt2333.simplicitytools.hooks.rules.all.android.DeleteOnPostNotificationForAll
import com.lt2333.simplicitytools.hooks.rules.all.android.DisableFlagSecureForAll import com.lt2333.simplicitytools.hooks.rules.all.android.DisableFlagSecureForAll
import com.lt2333.simplicitytools.hooks.rules.all.corepatch.CorePatchMainHook import com.lt2333.simplicitytools.hooks.rules.all.corepatch.CorePatchMainHook
import com.lt2333.simplicitytools.hooks.rules.s.android.MaxWallpaperScaleForS import com.lt2333.simplicitytools.hooks.rules.s.android.*
import com.lt2333.simplicitytools.hooks.rules.s.android.RemoveSmallWindowRestrictionsForS
import com.lt2333.simplicitytools.hooks.rules.s.android.SystemPropertiesHookForS
import com.lt2333.simplicitytools.hooks.rules.t.android.MaxWallpaperScaleForT import com.lt2333.simplicitytools.hooks.rules.t.android.MaxWallpaperScaleForT
import com.lt2333.simplicitytools.hooks.rules.t.android.SystemPropertiesHookForT import com.lt2333.simplicitytools.hooks.rules.t.android.SystemPropertiesHookForT
import com.lt2333.simplicitytools.utils.xposed.base.AppRegister import com.lt2333.simplicitytools.utils.xposed.base.AppRegister
@@ -31,7 +29,6 @@ object Android : AppRegister() {
AllowUntrustedTouchesForAll, //允许不受信任的触摸 AllowUntrustedTouchesForAll, //允许不受信任的触摸
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(
lpparam, lpparam,

View File

@@ -11,15 +11,12 @@ object Cast : AppRegister() {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
when (Build.VERSION.SDK_INT) { when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.TIRAMISU -> { Build.VERSION_CODES.TIRAMISU -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
ForceSupportSendAppForAll, //强制允许所有应用接力 ForceSupportSendAppForAll, //强制允许所有应用接力
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
ForceSupportSendAppForAll, //强制允许所有应用接力 ForceSupportSendAppForAll, //强制允许所有应用接力
) )
} }

View File

@@ -17,7 +17,6 @@ object MediaEditor : AppRegister() {
UnlockUnlimitedCroppingForT, //解锁裁切最小值 UnlockUnlimitedCroppingForT, //解锁裁切最小值
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(
lpparam, lpparam,

View File

@@ -1,13 +1,8 @@
package com.lt2333.simplicitytools.hooks.apps package com.lt2333.simplicitytools.hooks.apps
import android.os.Build import android.os.Build
import com.lt2333.simplicitytools.hooks.rules.all.miuihome.AlwaysShowStatusBarClockForAll import com.lt2333.simplicitytools.hooks.rules.all.miuihome.AlwaysDisplayTimeForAll
import com.lt2333.simplicitytools.hooks.rules.all.miuihome.DisableRecentViewWallpaperDarkeningForAll
import com.lt2333.simplicitytools.hooks.rules.all.miuihome.DoubleTapToSleepForAll import com.lt2333.simplicitytools.hooks.rules.all.miuihome.DoubleTapToSleepForAll
import com.lt2333.simplicitytools.hooks.rules.all.miuihome.ModifyRecentViewRemoveCardAnimForAll
import com.lt2333.simplicitytools.hooks.rules.all.miuihome.RemoveSmallWindowRestrictionForMiuiHomeForAll
import com.lt2333.simplicitytools.hooks.rules.all.miuihome.ScrollIconNameForAll
import com.lt2333.simplicitytools.hooks.rules.all.miuihome.ShortcutAddSmallWindowForAll
import com.lt2333.simplicitytools.utils.xposed.base.AppRegister import com.lt2333.simplicitytools.utils.xposed.base.AppRegister
import de.robv.android.xposed.callbacks.XC_LoadPackage import de.robv.android.xposed.callbacks.XC_LoadPackage
@@ -19,26 +14,15 @@ object MiuiHome : AppRegister() {
Build.VERSION_CODES.TIRAMISU -> { Build.VERSION_CODES.TIRAMISU -> {
autoInitHooks( autoInitHooks(
lpparam, lpparam,
AlwaysShowStatusBarClockForAll, //时钟显示时钟 AlwaysDisplayTimeForAll, //时钟显示时钟
DoubleTapToSleepForAll, //双击锁屏 DoubleTapToSleepForAll, //双击锁屏
DisableRecentViewWallpaperDarkeningForAll, //取消后台壁纸压暗效果
ModifyRecentViewRemoveCardAnimForAll, //横向排布后台划卡动画
ScrollIconNameForAll, //滚动显示应用标题
RemoveSmallWindowRestrictionForMiuiHomeForAll, //取消小窗限制
ShortcutAddSmallWindowForAll, //快捷菜单添加小窗
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(
lpparam, lpparam,
AlwaysShowStatusBarClockForAll, //时钟显示时钟 AlwaysDisplayTimeForAll, //时钟显示时钟
DoubleTapToSleepForAll, //双击锁屏 DoubleTapToSleepForAll, //双击锁屏
DisableRecentViewWallpaperDarkeningForAll, //取消后台壁纸压暗效果
ModifyRecentViewRemoveCardAnimForAll, //横向排布后台划卡动画
ScrollIconNameForAll, //滚动显示应用标题
RemoveSmallWindowRestrictionForMiuiHomeForAll, //取消小窗限制
ShortcutAddSmallWindowForAll, //快捷菜单添加小窗
) )
} }
} }

View File

@@ -14,18 +14,15 @@ object PowerKeeper : AppRegister() {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
when (Build.VERSION.SDK_INT) { when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.TIRAMISU -> { Build.VERSION_CODES.TIRAMISU -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
LockMaxFpsForAll, //锁定最高刷新率 LockMaxFpsForAll, //锁定最高刷新率
PreventRecoveryOfBatteryOptimizationWhitelistForS, //防止恢复电池优化白名单 PreventRecoveryOfBatteryOptimizationWhitelistForS, //防止恢复电池优化白名单
DoNotClearAppForS,//阻止杀后台 DoNotClearAppForS,//阻止杀后台
MakeMilletMoreAggressiveForS,//使 Millet 更激进 MakeMilletMoreAggressiveForS,//使 Millet 更激进
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
LockMaxFpsForAll, //锁定最高刷新率 LockMaxFpsForAll, //锁定最高刷新率
PreventRecoveryOfBatteryOptimizationWhitelistForS, //防止恢复电池优化白名单 PreventRecoveryOfBatteryOptimizationWhitelistForS, //防止恢复电池优化白名单
DoNotClearAppForS,//阻止杀后台 DoNotClearAppForS,//阻止杀后台

View File

@@ -11,15 +11,12 @@ object RearDisplay : AppRegister() {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
when (Build.VERSION.SDK_INT) { when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.TIRAMISU -> { Build.VERSION_CODES.TIRAMISU -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
RearDisplayWeatherForAll, //背屏显示天气 RearDisplayWeatherForAll, //背屏显示天气
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
RearDisplayWeatherForAll, //背屏显示天气 RearDisplayWeatherForAll, //背屏显示天气
) )
} }

View File

@@ -12,15 +12,12 @@ object ScreenShot : AppRegister() {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
when (Build.VERSION.SDK_INT) { when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.TIRAMISU -> { Build.VERSION_CODES.TIRAMISU -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
UnlockUnlimitedCroppingForT, //解锁裁切限制 UnlockUnlimitedCroppingForT, //解锁裁切限制
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
UnlockUnlimitedCroppingForS, //解锁裁切限制 UnlockUnlimitedCroppingForS, //解锁裁切限制
) )
} }

View File

@@ -2,9 +2,9 @@ package com.lt2333.simplicitytools.hooks.apps
import android.os.Build import android.os.Build
import com.lt2333.simplicitytools.hooks.rules.all.securitycenter.LockOneHundredForAll import com.lt2333.simplicitytools.hooks.rules.all.securitycenter.LockOneHundredForAll
import com.lt2333.simplicitytools.hooks.rules.all.securitycenter.RemoveMacroBlacklistForAll
import com.lt2333.simplicitytools.hooks.rules.all.securitycenter.RemoveOpenAppConfirmationPopupForAll import com.lt2333.simplicitytools.hooks.rules.all.securitycenter.RemoveOpenAppConfirmationPopupForAll
import com.lt2333.simplicitytools.hooks.rules.all.securitycenter.SkipWaitingTimeForAll import com.lt2333.simplicitytools.hooks.rules.all.securitycenter.SkipWaitingTimeForAll
import com.lt2333.simplicitytools.hooks.rules.all.securitycenter.RemoveMacroBlacklistForAll
import com.lt2333.simplicitytools.hooks.rules.s.securitycenter.ShowBatteryTemperatureForS import com.lt2333.simplicitytools.hooks.rules.s.securitycenter.ShowBatteryTemperatureForS
import com.lt2333.simplicitytools.hooks.rules.t.securitycenter.ShowBatteryTemperatureForT import com.lt2333.simplicitytools.hooks.rules.t.securitycenter.ShowBatteryTemperatureForT
import com.lt2333.simplicitytools.utils.xposed.base.AppRegister import com.lt2333.simplicitytools.utils.xposed.base.AppRegister
@@ -16,8 +16,7 @@ object SecurityCenter : AppRegister() {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
when (Build.VERSION.SDK_INT) { when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.TIRAMISU -> { Build.VERSION_CODES.TIRAMISU -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
SkipWaitingTimeForAll, //跳过 5/10秒等待时间 SkipWaitingTimeForAll, //跳过 5/10秒等待时间
LockOneHundredForAll, //锁定 100分 LockOneHundredForAll, //锁定 100分
RemoveMacroBlacklistForAll, //去除自动连招黑名单 RemoveMacroBlacklistForAll, //去除自动连招黑名单
@@ -25,10 +24,8 @@ object SecurityCenter : AppRegister() {
RemoveOpenAppConfirmationPopupForAll, //去除打开应用弹窗 RemoveOpenAppConfirmationPopupForAll, //去除打开应用弹窗
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
SkipWaitingTimeForAll, //跳过 5/10秒等待时间 SkipWaitingTimeForAll, //跳过 5/10秒等待时间
LockOneHundredForAll, //锁定 100分 LockOneHundredForAll, //锁定 100分
RemoveMacroBlacklistForAll, //去除自动连招黑名单 RemoveMacroBlacklistForAll, //去除自动连招黑名单

View File

@@ -11,15 +11,12 @@ object Settings : AppRegister() {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
when (Build.VERSION.SDK_INT) { when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.TIRAMISU -> { Build.VERSION_CODES.TIRAMISU -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
ShowNotificationImportanceForAll, //显示通知重要程度 ShowNotificationImportanceForAll, //显示通知重要程度
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
ShowNotificationImportanceForAll, //显示通知重要程度 ShowNotificationImportanceForAll, //显示通知重要程度
) )
} }

View File

@@ -1,37 +1,7 @@
package com.lt2333.simplicitytools.hooks.apps package com.lt2333.simplicitytools.hooks.apps
import android.os.Build import android.os.Build
import com.lt2333.simplicitytools.hooks.rules.s.systemui.BatteryPercentageForS import com.lt2333.simplicitytools.hooks.rules.s.systemui.*
import com.lt2333.simplicitytools.hooks.rules.s.systemui.CanNotificationSlideForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.ControlCenterWeatherForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.CustomMobileTypeTextForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.DoubleLineNetworkSpeedForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.HideBatteryIconForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.HideHDIconForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.HideMobileActivityIconForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.HideMobileTypeIconForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.HideNetworkSpeedSplitterForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.HideSimIconForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.HideStatusBarIconForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.HideStatusBarNetworkSpeedSecondForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.HideWifiActivityIconForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.LockScreenClockDisplaySecondsForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.LockScreenCurrentForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.LockScreenDoubleTapToSleepForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.MaximumNumberOfNotificationIconsForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.NewNotificationWeatherForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.NotificationWeatherForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.OldNotificationWeatherForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.OldQSCustomForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.RemoveLockScreenCameraForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.RemoveTheLeftSideOfTheLockScreenForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.ShowWifiStandardForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.StatusBarBigMobileTypeIconForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.StatusBarDoubleTapToSleepForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.StatusBarLayoutForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.StatusBarNetworkSpeedRefreshSpeedForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.StatusBarTimeCustomizationForS
import com.lt2333.simplicitytools.hooks.rules.s.systemui.WaveChargeForS
import com.lt2333.simplicitytools.hooks.rules.t.systemui.* import com.lt2333.simplicitytools.hooks.rules.t.systemui.*
import com.lt2333.simplicitytools.utils.xposed.base.AppRegister import com.lt2333.simplicitytools.utils.xposed.base.AppRegister
import de.robv.android.xposed.callbacks.XC_LoadPackage import de.robv.android.xposed.callbacks.XC_LoadPackage
@@ -42,8 +12,7 @@ object SystemUI : AppRegister() {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
when (Build.VERSION.SDK_INT) { when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.TIRAMISU -> { Build.VERSION_CODES.TIRAMISU -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
HideStatusBarIconForT, //隐藏状态栏图标 HideStatusBarIconForT, //隐藏状态栏图标
HideBatteryIconForT, //隐藏电池 HideBatteryIconForT, //隐藏电池
HideHDIconForT, //隐藏HD图标 HideHDIconForT, //隐藏HD图标
@@ -75,13 +44,10 @@ object SystemUI : AppRegister() {
CanNotificationSlideForT, //允许下滑通知打开小窗 CanNotificationSlideForT, //允许下滑通知打开小窗
LockScreenClockDisplaySecondsForT, // 锁屏时钟显示秒 LockScreenClockDisplaySecondsForT, // 锁屏时钟显示秒
ShowWifiStandardForT, // 显示 WIFI 角标 ShowWifiStandardForT, // 显示 WIFI 角标
DisableBluetoothTemporarilyOffForT, //禁用临时蓝牙关闭
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
HideStatusBarIconForS, //隐藏状态栏图标 HideStatusBarIconForS, //隐藏状态栏图标
HideBatteryIconForS, //隐藏电池 HideBatteryIconForS, //隐藏电池
HideHDIconForS, //隐藏HD图标 HideHDIconForS, //隐藏HD图标

View File

@@ -11,15 +11,12 @@ object ThemeManager : AppRegister() {
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) { override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
when (Build.VERSION.SDK_INT) { when (Build.VERSION.SDK_INT) {
Build.VERSION_CODES.TIRAMISU -> { Build.VERSION_CODES.TIRAMISU -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
RemoveAdsForAll, //移除主题壁纸的广告 RemoveAdsForAll, //移除主题壁纸的广告
) )
} }
Build.VERSION_CODES.S -> { Build.VERSION_CODES.S -> {
autoInitHooks( autoInitHooks(lpparam,
lpparam,
RemoveAdsForAll, //移除主题壁纸的广告 RemoveAdsForAll, //移除主题壁纸的广告
) )
} }

View File

@@ -1,13 +1,12 @@
package com.lt2333.simplicitytools.hooks.apps package com.lt2333.simplicitytools.hooks.apps
import com.github.kyuubiran.ezxhelper.utils.findMethod import com.github.kyuubiran.ezxhelper.utils.findMethod
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import com.github.kyuubiran.ezxhelper.utils.hookReturnConstant import com.github.kyuubiran.ezxhelper.utils.hookReturnConstant
import com.github.kyuubiran.ezxhelper.utils.loadClassOrNull import com.github.kyuubiran.ezxhelper.utils.loadClassOrNull
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import com.lt2333.simplicitytools.utils.hasEnable import com.lt2333.simplicitytools.utils.hasEnable
import com.lt2333.simplicitytools.utils.xposed.base.AppRegister import com.lt2333.simplicitytools.utils.xposed.base.AppRegister
import de.robv.android.xposed.callbacks.XC_LoadPackage import de.robv.android.xposed.callbacks.XC_LoadPackage
object Updater : AppRegister() { object Updater : AppRegister() {
override val packageName: String = "com.android.updater" override val packageName: String = "com.android.updater"

View File

@@ -5,7 +5,8 @@ import com.github.kyuubiran.ezxhelper.utils.hookBefore
import com.lt2333.simplicitytools.utils.hasEnable import com.lt2333.simplicitytools.utils.hasEnable
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
object AlwaysShowStatusBarClockForAll : HookRegister() { object AlwaysDisplayTimeForAll : HookRegister() {
override fun init() { override fun init() {
try { try {
findMethod("com.miui.home.launcher.Workspace") { findMethod("com.miui.home.launcher.Workspace") {

View File

@@ -1,19 +0,0 @@
package com.lt2333.simplicitytools.hooks.rules.all.miuihome
import com.github.kyuubiran.ezxhelper.utils.findMethod
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import com.github.kyuubiran.ezxhelper.utils.putObject
import com.lt2333.simplicitytools.utils.hasEnable
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
object DisableRecentViewWallpaperDarkeningForAll : HookRegister() {
override fun init() = hasEnable("miuihome_recentwiew_wallpaper_darkening") {
findMethod("com.miui.home.recents.DimLayer") {
name == "dim" && parameterCount == 3
}.hookBefore {
it.args[0] = 0.0f
it.thisObject.putObject("mCurrentAlpha", 0.0f)
}
}
}

View File

@@ -1,46 +0,0 @@
package com.lt2333.simplicitytools.hooks.rules.all.miuihome
import android.animation.ObjectAnimator
import android.animation.TimeInterpolator
import android.view.MotionEvent
import android.view.View
import com.lt2333.simplicitytools.utils.*
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
import de.robv.android.xposed.XposedHelpers
object ModifyRecentViewRemoveCardAnimForAll : HookRegister() {
override fun init() = hasEnable("miuihome_recentview_remove_card_animation") {
"com.miui.home.recents.views.SwipeHelperForRecents".hookAfterMethod("onTouchEvent", MotionEvent::class.java) {
val mCurrView = it.thisObject.getObjectField("mCurrView") as View?
if (mCurrView != null) {
mCurrView.alpha = 1f
mCurrView.scaleX = 1f
mCurrView.scaleY = 1f
}
}
"com.miui.home.recents.TaskStackViewLayoutStyleHorizontal".replaceMethod("createScaleDismissAnimation", View::class.java, Float::class.java) {
val view = it.args[0] as View
val getScreenHeight = "com.miui.home.launcher.DeviceConfig".findClass().callStaticMethod("getScreenHeight") as Int
val ofFloat = ObjectAnimator.ofFloat(view, View.TRANSLATION_Y, view.translationY, -getScreenHeight * 1.1484375f)
val physicBasedInterpolator = XposedHelpers.newInstance("com.miui.home.launcher.anim.PhysicBasedInterpolator".findClass(), 0.9f, 0.78f)
ofFloat.interpolator = physicBasedInterpolator as TimeInterpolator
ofFloat.duration = 400
return@replaceMethod ofFloat
}
"com.miui.home.recents.views.VerticalSwipe".hookAfterMethod("calculate", Float::class.java) {
val f = it.args[0] as Float
val asScreenHeightWhenDismiss = "com.miui.home.recents.views.VerticalSwipe".findClass().callStaticMethod("getAsScreenHeightWhenDismiss") as Int
val f2 = f / asScreenHeightWhenDismiss
val mTaskViewHeight = it.thisObject.getObjectField("mTaskViewHeight") as Float
val mCurScale = it.thisObject.getObjectField("mCurScale") as Float
val f3: Float = mTaskViewHeight * mCurScale
val i = if (f2 > 0.0f) 1 else if (f2 == 0.0f) 0 else -1
val afterFrictionValue: Float = it.thisObject.callMethod("afterFrictionValue", f, asScreenHeightWhenDismiss) as Float
if (i < 0) it.thisObject.setObjectField("mCurTransY", (mTaskViewHeight / 2.0f + afterFrictionValue * 2) - (f3 / 2.0f))
}
}
}

View File

@@ -1,28 +0,0 @@
package com.lt2333.simplicitytools.hooks.rules.all.miuihome
import com.github.kyuubiran.ezxhelper.utils.findAllMethods
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import com.lt2333.simplicitytools.utils.hasEnable
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
object RemoveSmallWindowRestrictionForMiuiHomeForAll : HookRegister() {
override fun init() {
findAllMethods("com.miui.home.launcher.RecentsAndFSGestureUtils") {
name == "canTaskEnterSmallWindow"
}.hookBefore {
hasEnable("android_remove_small_window_restriction") {
it.result = true
}
}
findAllMethods("com.miui.home.launcher.RecentsAndFSGestureUtils") {
name == "canTaskEnterMiniSmallWindow"
}.hookBefore {
hasEnable("android_remove_small_window_restriction") {
it.result = true
}
}
}
}

View File

@@ -1,85 +0,0 @@
package com.lt2333.simplicitytools.hooks.rules.all.miuihome
import android.annotation.SuppressLint
import android.content.Context
import android.text.TextUtils
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.github.kyuubiran.ezxhelper.utils.Log
import com.github.kyuubiran.ezxhelper.utils.args
import com.github.kyuubiran.ezxhelper.utils.findMethod
import com.github.kyuubiran.ezxhelper.utils.getObject
import com.github.kyuubiran.ezxhelper.utils.hookAfter
import com.github.kyuubiran.ezxhelper.utils.invokeMethod
import com.lt2333.simplicitytools.utils.*
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
object ScrollIconNameForAll : HookRegister() {
@SuppressLint("DiscouragedApi")
override fun init() = hasEnable("miuihome_scroll_icon_name") {
val launcherClass = "com.miui.home.launcher.Launcher".findClass()
val shortcutInfoClass = "com.miui.home.launcher.ShortcutInfo".findClass()
try {
"com.miui.home.launcher.ItemIcon".hookAfterMethod(
"onFinishInflate"
) {
val mTitle = it.thisObject.getObjectField("mTitle") as TextView
mTitleScrolling(mTitle)
}
"com.miui.home.launcher.maml.MaMlWidgetView".hookAfterMethod(
"onFinishInflate"
) {
val mTitle = it.thisObject.getObjectField("mTitleTextView") as TextView
mTitleScrolling(mTitle)
}
"com.miui.home.launcher.LauncherMtzGadgetView".hookAfterMethod(
"onFinishInflate"
) {
val mTitle = it.thisObject.getObjectField("mTitleTextView") as TextView
mTitleScrolling(mTitle)
}
"com.miui.home.launcher.LauncherWidgetView".hookAfterMethod(
"onFinishInflate"
) {
val mTitle = it.thisObject.getObjectField("mTitleTextView") as TextView
mTitleScrolling(mTitle)
}
"com.miui.home.launcher.ShortcutIcon".hookAfterMethod(
"fromXml", Int::class.javaPrimitiveType, launcherClass, ViewGroup::class.java, shortcutInfoClass
) {
val buddyIconView = it.args[3].callMethod("getBuddyIconView", it.args[2]) as View
val mTitle = buddyIconView.getObjectField("mTitle") as TextView
mTitleScrolling(mTitle)
}
"com.miui.home.launcher.ShortcutIcon".hookAfterMethod(
"createShortcutIcon", Int::class.javaPrimitiveType, launcherClass, ViewGroup::class.java
) {
val buddyIcon = it.result as View
val mTitle = buddyIcon.getObjectField("mTitle") as TextView
mTitleScrolling(mTitle)
}
"com.miui.home.launcher.common.Utilities".hookAfterMethod(
"adaptTitleStyleToWallpaper", Context::class.java, TextView::class.java, Int::class.javaPrimitiveType, Int::class.javaPrimitiveType
) {
val mTitle = it.args[1] as TextView
if (mTitle.id == mTitle.resources.getIdentifier("icon_title", "id", "com.miui.home")) {
mTitleScrolling(mTitle)
}
}
} catch (e: Throwable) {
Log.ex(e)
}
}
private fun mTitleScrolling(mTitle: TextView) {
mTitle.ellipsize = TextUtils.TruncateAt.MARQUEE
mTitle.isHorizontalFadingEdgeEnabled = true
mTitle.setSingleLine()
mTitle.marqueeRepeatLimit = -1
mTitle.isSelected = true
mTitle.setHorizontallyScrolling(true)
}
}

View File

@@ -1,89 +0,0 @@
package com.lt2333.simplicitytools.hooks.rules.all.miuihome
import android.app.AndroidAppHelper
import android.content.ComponentName
import android.content.Intent
import android.content.res.Configuration
import android.os.Bundle
import android.view.View
import com.github.kyuubiran.ezxhelper.init.InitFields.moduleRes
import com.github.kyuubiran.ezxhelper.utils.args
import com.github.kyuubiran.ezxhelper.utils.findAllMethods
import com.github.kyuubiran.ezxhelper.utils.findMethod
import com.github.kyuubiran.ezxhelper.utils.getStaticObject
import com.github.kyuubiran.ezxhelper.utils.hookAfter
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import com.github.kyuubiran.ezxhelper.utils.invokeMethod
import com.github.kyuubiran.ezxhelper.utils.invokeStaticMethod
import com.github.kyuubiran.ezxhelper.utils.loadClass
import com.github.kyuubiran.ezxhelper.utils.putStaticObject
import com.lt2333.simplicitytools.R
import com.lt2333.simplicitytools.utils.*
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
import de.robv.android.xposed.XposedHelpers
object ShortcutAddSmallWindowForAll : HookRegister() {
override fun init() = hasEnable("miuihome_shortcut_add_small_window") {
val mViewDarkModeHelper = ("com.miui.home.launcher.util.ViewDarkModeHelper").findClass()
val mSystemShortcutMenu = ("com.miui.home.launcher.shortcuts.SystemShortcutMenu").findClass()
val mSystemShortcutMenuItem = ("com.miui.home.launcher.shortcuts.SystemShortcutMenuItem").findClass()
val mAppShortcutMenu = ("com.miui.home.launcher.shortcuts.AppShortcutMenu").findClass()
val mShortcutMenuItem = ("com.miui.home.launcher.shortcuts.ShortcutMenuItem").findClass()
val mAppDetailsShortcutMenuItem = ("com.miui.home.launcher.shortcuts.SystemShortcutMenuItem\$AppDetailsShortcutMenuItem").findClass()
val mActivityUtilsCompat = ("com.miui.launcher.utils.ActivityUtilsCompat").findClass()
mViewDarkModeHelper.hookAfterAllMethods("onConfigurationChanged") {
mSystemShortcutMenuItem.callStaticMethod("createAllSystemShortcutMenuItems")
}
mShortcutMenuItem.hookAfterAllMethods("getShortTitle") {
if (it.result == "应用信息") {
it.result = "信息"
}
}
mAppDetailsShortcutMenuItem.hookBeforeMethod("lambda\$getOnClickListener$0", mAppDetailsShortcutMenuItem, View::class.java) {
val obj = it.args[0]
val view: View = it.args[1] as View
val mShortTitle = obj.callMethod("getShortTitle") as CharSequence
if (mShortTitle == moduleRes.getString(R.string.miuihome_shortcut_add_small_window_title)) {
it.result = null
val intent = Intent()
val mComponentName = obj.callMethod("getComponentName") as ComponentName
intent.action = "android.intent.action.MAIN"
intent.addCategory("android.intent.category.LAUNCHER")
intent.component = mComponentName
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
val callStaticMethod = mActivityUtilsCompat.callStaticMethod("makeFreeformActivityOptions", view.context, mComponentName.packageName)
if (callStaticMethod != null) {
view.context.startActivity(intent, callStaticMethod.callMethod("toBundle") as Bundle)
}
}
}
mSystemShortcutMenu.hookAfterAllMethods("getMaxShortcutItemCount") {
it.result = 5
}
mAppShortcutMenu.hookAfterAllMethods("getMaxShortcutItemCount") {
it.result = 5
}
mSystemShortcutMenuItem.hookAfterAllMethods("createAllSystemShortcutMenuItems") {
val isDarkMode =
AndroidAppHelper.currentApplication().applicationContext.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
val mAllSystemShortcutMenuItems = mSystemShortcutMenuItem.getStaticObjectField("sAllSystemShortcutMenuItems") as Collection<Any>
val mSmallWindowInstance = XposedHelpers.newInstance(mAppDetailsShortcutMenuItem)
mSmallWindowInstance.callMethod("setShortTitle", moduleRes.getString(R.string.miuihome_shortcut_add_small_window_title))
mSmallWindowInstance.callMethod(
"setIconDrawable",
if (isDarkMode) moduleRes.getDrawable(R.drawable.ic_small_window_dark) else moduleRes.getDrawable(R.drawable.ic_small_window_light)
)
val sAllSystemShortcutMenuItems = ArrayList<Any>()
sAllSystemShortcutMenuItems.add(mSmallWindowInstance)
sAllSystemShortcutMenuItems.addAll(mAllSystemShortcutMenuItems)
mSystemShortcutMenuItem.setStaticObjectField("sAllSystemShortcutMenuItems", sAllSystemShortcutMenuItems)
}
}
}

View File

@@ -1,29 +1,27 @@
package com.lt2333.simplicitytools.hooks.rules.all.securitycenter package com.lt2333.simplicitytools.hooks.rules.all.securitycenter
import com.github.kyuubiran.ezxhelper.utils.*
import com.lt2333.simplicitytools.utils.XSPUtils import com.lt2333.simplicitytools.utils.XSPUtils
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
import de.robv.android.xposed.XC_MethodHook import de.robv.android.xposed.XC_MethodHook
import de.robv.android.xposed.XposedBridge
import de.robv.android.xposed.XposedHelpers import de.robv.android.xposed.XposedHelpers
object RemoveMacroBlacklistForAll : HookRegister() { object RemoveMacroBlacklistForAll : HookRegister() {
override fun init() { override fun init() {
// TODO: 新版已失效
if (XSPUtils.getBoolean("remove_macro_blacklist", false)) { if (XSPUtils.getBoolean("remove_macro_blacklist", false)) {
var letter = 'a' var letter = 'a'
for (i in 0..25) { for (i in 0..25) {
val classIfExists = XposedHelpers.findClassIfExists( val classIfExists = XposedHelpers.findClassIfExists(
"com.miui.gamebooster.utils.$letter" + "0", getDefaultClassLoader() "com.miui.gamebooster.v.$letter" + "0", getDefaultClassLoader()
) ?: continue ) ?: continue
if (classIfExists.declaredMethods.size in 10..15 && classIfExists.fields.isEmpty() && classIfExists.declaredFields.size >= 2) { if (classIfExists.declaredMethods.size in 6..12 && classIfExists.fields.isEmpty() && classIfExists.declaredFields.size >= 2) {
XposedBridge.log("Woobox: RemoveMacroBlacklist in ${classIfExists.name}") XposedHelpers.findAndHookMethod(classIfExists, "c", String::class.java,
findMethod(classIfExists){ object : XC_MethodHook() {
name=="c" && returnType==Boolean::class.java && isStatic &&parameterCount==1 override fun beforeHookedMethod(param: MethodHookParam?) {
}.hookBefore { param?.result = false
XposedBridge.log("Woobox: c")
it.result = false
} }
})
return return
} }
letter++ letter++

View File

@@ -1,6 +1,5 @@
package com.lt2333.simplicitytools.hooks.rules.s.systemui package com.lt2333.simplicitytools.hooks.rules.s.systemui
import android.app.KeyguardManager import android.app.KeyguardManager
import android.content.Context import android.content.Context
import android.content.res.Configuration import android.content.res.Configuration
@@ -17,11 +16,10 @@ import com.lt2333.simplicitytools.utils.XSPUtils
import com.lt2333.simplicitytools.utils.hasEnable import com.lt2333.simplicitytools.utils.hasEnable
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
object StatusBarLayoutForS : HookRegister() { object StatusBarLayoutForS : HookRegister() {
private val getMode = XSPUtils.getInt("status_bar_layout_mode", 0) private val getMode = XSPUtils.getInt("status_bar_layout_mode", 0)
private val isCompatibilityMode = XSPUtils.getBoolean("layout_compatibility_mode", false) private val getHoleLocation = XSPUtils.getInt("screen_hole_location", 0)
private var statusBarLeft = 0 private var statusBarLeft = 0
private var statusBarTop = 0 private var statusBarTop = 0
@@ -34,31 +32,23 @@ object StatusBarLayoutForS : HookRegister() {
var mCenterLayout: LinearLayout? var mCenterLayout: LinearLayout?
var statusBar: ViewGroup? = null var statusBar: ViewGroup? = null
//判断屏幕状态更新布局 mode: 1正常布局 2居中布局 fun updateLayout(context: Context) {
fun updateLayout(context: Context,mode: Int) { //判断屏幕方向
when(mode){
1->{
val mConfiguration: Configuration = context.resources.configuration val mConfiguration: Configuration = context.resources.configuration
if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) { //横屏 if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) {
statusBar!!.setPadding(statusBarLeft, statusBarTop, statusBarRight, statusBarBottom)
}
}
2->{
val mConfiguration: Configuration = context.resources.configuration
if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) { //横屏
mLeftLayout!!.setPadding(statusBarLeft, 0, 0, 0) mLeftLayout!!.setPadding(statusBarLeft, 0, 0, 0)
mRightLayout!!.setPadding(0, 0, statusBarRight, 0) mRightLayout!!.setPadding(0, 0, statusBarRight, 0)
statusBar!!.setPadding(0, statusBarTop, 0, statusBarBottom) statusBar!!.setPadding(0, statusBarTop, 0, statusBarBottom)
}else{ //竖屏 } else {
mLeftLayout!!.setPadding(0, 0, 0, 0) //横屏状态
mRightLayout!!.setPadding(0, 0, 0, 0) mLeftLayout!!.setPadding(175, 0, 0, 0)
} mRightLayout!!.setPadding(0, 0, 175, 0)
} statusBar!!.setPadding(0, statusBarTop, 0, statusBarBottom)
} }
} }
//判断是否开启挖孔兼容模式 //判断是否开启居中挖孔兼容模式
if (isCompatibilityMode) { if (getHoleLocation == 1) {
findMethod("com.android.systemui.ScreenDecorations\$DisplayCutoutView") { findMethod("com.android.systemui.ScreenDecorations\$DisplayCutoutView") {
name == "boundsFromDirection" && parameterCount == 3 && isStatic name == "boundsFromDirection" && parameterCount == 3 && isStatic
}.hookBefore { }.hookBefore {
@@ -66,83 +56,48 @@ object StatusBarLayoutForS : HookRegister() {
} }
} }
//修改对应布局
when (getMode) { when (getMode) {
//默认 //默认
0 -> { 0 -> return
findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") {
name == "onViewCreated" && parameterCount == 2
}.hookAfter { param ->
val miuiPhoneStatusBarView = param.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val context: Context = miuiPhoneStatusBarView.context
val res: Resources = miuiPhoneStatusBarView.resources
val statusBarId: Int = res.getIdentifier("status_bar", "id", "com.android.systemui")
statusBar = miuiPhoneStatusBarView.findViewById(statusBarId)
if (statusBar == null) return@hookAfter
statusBarLeft = statusBar!!.paddingLeft
statusBarTop = statusBar!!.paddingTop
statusBarRight = statusBar!!.paddingRight
statusBarBottom = statusBar!!.paddingBottom
if (isCompatibilityMode) {
val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0)
if (customLeftMargin != 0) {
statusBarLeft = customLeftMargin
}
val customRightMargin = XSPUtils.getInt("status_bar_right_margin", 0)
if (customRightMargin != 0) {
statusBarRight = customRightMargin
}
updateLayout(context,1)
}
}
//兼容模式
findMethod("com.android.systemui.statusbar.phone.PhoneStatusBarView") {
name == "updateLayoutForCutout"
}.hookAfter {
if (isCompatibilityMode) {
val context = (it.thisObject as ViewGroup).context
updateLayout(context,1)
}
}
}
//时钟居中 //时钟居中
1 -> { 1 -> {
findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") { findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") {
name == "onViewCreated" && parameterCount == 2 name == "onViewCreated" && parameterCount == 2
}.hookAfter { param -> }.hookAfter { param ->
val miuiPhoneStatusBarView = param.thisObject.getObjectAs<ViewGroup>("mStatusBar") val miuiPhoneStatusBarView =
param.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val context: Context = miuiPhoneStatusBarView.context val context: Context = miuiPhoneStatusBarView.context
val res: Resources = miuiPhoneStatusBarView.resources val res: Resources = miuiPhoneStatusBarView.resources
val statusBarId: Int = res.getIdentifier("status_bar", "id", "com.android.systemui") val statusBarId: Int =
val statusBarContentsId: Int = res.getIdentifier( res.getIdentifier("status_bar", "id", "com.android.systemui")
"status_bar_contents", "id", "com.android.systemui" val statusBarContentsId: Int =
) res.getIdentifier("status_bar_contents", "id", "com.android.systemui")
val systemIconAreaId: Int = res.getIdentifier("system_icon_area", "id", "com.android.systemui") val systemIconAreaId: Int =
res.getIdentifier("system_icon_area", "id", "com.android.systemui")
val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui") val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui")
val phoneStatusBarLeftContainerId: Int = res.getIdentifier( val phoneStatusBarLeftContainerId: Int =
"phone_status_bar_left_container", "id", "com.android.systemui" res.getIdentifier(
"phone_status_bar_left_container",
"id",
"com.android.systemui"
) )
val notificationIconAreaInnerId: Int = res.getIdentifier( val notificationIconAreaInnerId: Int =
"notification_icon_area_inner", "id", "com.android.systemui" res.getIdentifier(
"notification_icon_area_inner",
"id",
"com.android.systemui"
) )
statusBar = miuiPhoneStatusBarView.findViewById(statusBarId) statusBar = miuiPhoneStatusBarView.findViewById(statusBarId)
val statusBarContents: ViewGroup = miuiPhoneStatusBarView.findViewById(statusBarContentsId) val statusBarContents: ViewGroup =
miuiPhoneStatusBarView.findViewById(statusBarContentsId)
if (statusBar == null) return@hookAfter if (statusBar == null) return@hookAfter
val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId) val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId)
val phoneStatusBarLeftContainer: ViewGroup = miuiPhoneStatusBarView.findViewById( val phoneStatusBarLeftContainer: ViewGroup =
phoneStatusBarLeftContainerId miuiPhoneStatusBarView.findViewById(phoneStatusBarLeftContainerId)
) val notificationIconAreaInner: ViewGroup =
val notificationIconAreaInner: ViewGroup = miuiPhoneStatusBarView.findViewById( miuiPhoneStatusBarView.findViewById(notificationIconAreaInnerId)
notificationIconAreaInnerId val systemIconArea: ViewGroup =
) miuiPhoneStatusBarView.findViewById(systemIconAreaId)
val systemIconArea: ViewGroup = miuiPhoneStatusBarView.findViewById(systemIconAreaId)
(clock.parent as ViewGroup).removeView(clock) (clock.parent as ViewGroup).removeView(clock)
(phoneStatusBarLeftContainer.parent as ViewGroup).removeView( (phoneStatusBarLeftContainer.parent as ViewGroup).removeView(
@@ -153,39 +108,41 @@ object StatusBarLayoutForS : HookRegister() {
) )
(systemIconArea.parent as ViewGroup).removeView(systemIconArea) (systemIconArea.parent as ViewGroup).removeView(systemIconArea)
val mConstraintLayout = ConstraintLayout(context).also { val mConstraintLayout =
ConstraintLayout(context).also {
it.layoutParams = ConstraintLayout.LayoutParams( it.layoutParams = ConstraintLayout.LayoutParams(
ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT ConstraintLayout.LayoutParams.MATCH_PARENT,
ConstraintLayout.LayoutParams.MATCH_PARENT
) )
} }
mConstraintLayout.addView(notificationIconAreaInner) mConstraintLayout.addView(notificationIconAreaInner)
val fullscreenNotificationIconAreaLp = LinearLayout.LayoutParams( val fullscreenNotificationIconAreaLp = LinearLayout.LayoutParams(
ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT ConstraintLayout.LayoutParams.MATCH_PARENT,
ConstraintLayout.LayoutParams.MATCH_PARENT
) )
notificationIconAreaInner.layoutParams = fullscreenNotificationIconAreaLp notificationIconAreaInner.layoutParams = fullscreenNotificationIconAreaLp
//增加一个左对齐布局 //增加一个左对齐布局
mLeftLayout = LinearLayout(context) mLeftLayout = LinearLayout(context)
val leftLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val leftLp: LinearLayout.LayoutParams =
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
)
mLeftLayout!!.layoutParams = leftLp mLeftLayout!!.layoutParams = leftLp
mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL
//增加一个居中布局 //增加一个居中布局
mCenterLayout = LinearLayout(context) mCenterLayout = LinearLayout(context)
val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.MATCH_PARENT
) )
mCenterLayout!!.layoutParams = centerLp mCenterLayout!!.layoutParams = centerLp
mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL
mRightLayout = LinearLayout(context) mRightLayout = LinearLayout(context)
val rightLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val rightLp: LinearLayout.LayoutParams =
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
)
mRightLayout!!.layoutParams = rightLp mRightLayout!!.layoutParams = rightLp
mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL
mLeftLayout!!.addView(phoneStatusBarLeftContainer) mLeftLayout!!.addView(phoneStatusBarLeftContainer)
@@ -203,7 +160,7 @@ object StatusBarLayoutForS : HookRegister() {
statusBarBottom = statusBar!!.paddingBottom statusBarBottom = statusBar!!.paddingBottom
if (isCompatibilityMode) { if (getHoleLocation == 2) {
val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0) val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0)
if (customLeftMargin != 0) { if (customLeftMargin != 0) {
statusBarLeft = customLeftMargin statusBarLeft = customLeftMargin
@@ -213,7 +170,7 @@ object StatusBarLayoutForS : HookRegister() {
if (customRightMargin != 0) { if (customRightMargin != 0) {
statusBarRight = customRightMargin statusBarRight = customRightMargin
} }
updateLayout(context,2) updateLayout(context)
} }
} }
@@ -222,7 +179,7 @@ object StatusBarLayoutForS : HookRegister() {
}.hookAfter { }.hookAfter {
hasEnable("layout_compatibility_mode") { hasEnable("layout_compatibility_mode") {
val context = (it.thisObject as ViewGroup).context val context = (it.thisObject as ViewGroup).context
updateLayout(context,2) updateLayout(context)
} }
} }
} }
@@ -231,12 +188,14 @@ object StatusBarLayoutForS : HookRegister() {
findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") { findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") {
name == "onViewCreated" && parameterCount == 2 name == "onViewCreated" && parameterCount == 2
}.hookAfter { param -> }.hookAfter { param ->
val miuiPhoneStatusBarView = param.thisObject.getObjectAs<ViewGroup>("mStatusBar") val miuiPhoneStatusBarView =
param.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val context: Context = miuiPhoneStatusBarView.context val context: Context = miuiPhoneStatusBarView.context
val res: Resources = miuiPhoneStatusBarView.resources val res: Resources = miuiPhoneStatusBarView.resources
//组件ID //组件ID
val statusBarId: Int = res.getIdentifier("status_bar", "id", "com.android.systemui") val statusBarId: Int =
res.getIdentifier("status_bar", "id", "com.android.systemui")
val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui") val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui")
val batteryId: Int = res.getIdentifier("battery", "id", "com.android.systemui") val batteryId: Int = res.getIdentifier("battery", "id", "com.android.systemui")
@@ -248,7 +207,8 @@ object StatusBarLayoutForS : HookRegister() {
//新建布局 //新建布局
val rightLp = LinearLayout.LayoutParams( val rightLp = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.MATCH_PARENT
).also { ).also {
it.marginStart = dp2px(context, 5f) it.marginStart = dp2px(context, 5f)
} }
@@ -260,36 +220,6 @@ object StatusBarLayoutForS : HookRegister() {
battery.addView(mRightLayout) battery.addView(mRightLayout)
(clock.parent as ViewGroup).removeView(clock) (clock.parent as ViewGroup).removeView(clock)
mRightLayout!!.addView(clock) mRightLayout!!.addView(clock)
statusBarLeft = statusBar!!.paddingLeft
statusBarTop = statusBar!!.paddingTop
statusBarRight = statusBar!!.paddingRight
statusBarBottom = statusBar!!.paddingBottom
if (isCompatibilityMode) {
val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0)
if (customLeftMargin != 0) {
statusBarLeft = customLeftMargin
}
val customRightMargin = XSPUtils.getInt("status_bar_right_margin", 0)
if (customRightMargin != 0) {
statusBarRight = customRightMargin
}
updateLayout(context,1)
}
}
//兼容模式
findMethod("com.android.systemui.statusbar.phone.PhoneStatusBarView") {
name == "updateLayoutForCutout"
}.hookAfter {
if (isCompatibilityMode) {
val context = (it.thisObject as ViewGroup).context
updateLayout(context,1)
}
} }
} }
//时钟居中+图标居左 //时钟居中+图标居左
@@ -297,45 +227,65 @@ object StatusBarLayoutForS : HookRegister() {
findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") { findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") {
name == "onViewCreated" && parameterCount == 2 name == "onViewCreated" && parameterCount == 2
}.hookAfter { param -> }.hookAfter { param ->
val miuiPhoneStatusBarView = param.thisObject.getObjectAs<ViewGroup>("mStatusBar") val miuiPhoneStatusBarView =
param.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val context: Context = miuiPhoneStatusBarView.context val context: Context = miuiPhoneStatusBarView.context
val res: Resources = miuiPhoneStatusBarView.resources val res: Resources = miuiPhoneStatusBarView.resources
val statusBarId: Int = res.getIdentifier("status_bar", "id", "com.android.systemui") val statusBarId: Int =
val statusBarContentsId: Int = res.getIdentifier( res.getIdentifier("status_bar", "id", "com.android.systemui")
"status_bar_contents", "id", "com.android.systemui" val statusBarContentsId: Int =
) res.getIdentifier("status_bar_contents", "id", "com.android.systemui")
val systemIconAreaId: Int = res.getIdentifier("system_icon_area", "id", "com.android.systemui") val systemIconAreaId: Int =
res.getIdentifier("system_icon_area", "id", "com.android.systemui")
val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui") val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui")
val phoneStatusBarLeftContainerId: Int = res.getIdentifier( val phoneStatusBarLeftContainerId: Int =
"phone_status_bar_left_container", "id", "com.android.systemui" res.getIdentifier(
"phone_status_bar_left_container",
"id",
"com.android.systemui"
) )
val fullscreenNotificationIconAreaId: Int = res.getIdentifier( val fullscreenNotificationIconAreaId: Int =
"fullscreen_notification_icon_area", "id", "com.android.systemui" res.getIdentifier(
"fullscreen_notification_icon_area",
"id",
"com.android.systemui"
) )
val statusIconsId: Int = res.getIdentifier( val statusIconsId: Int =
"statusIcons", "id", "com.android.systemui" res.getIdentifier(
"statusIcons",
"id",
"com.android.systemui"
) )
val systemIconsId: Int = res.getIdentifier( val systemIconsId: Int =
"system_icons", "id", "com.android.systemui" res.getIdentifier(
"system_icons",
"id",
"com.android.systemui"
) )
val batteryId: Int = res.getIdentifier( val batteryId: Int =
"battery", "id", "com.android.systemui" res.getIdentifier(
"battery",
"id",
"com.android.systemui"
) )
statusBar = miuiPhoneStatusBarView.findViewById(statusBarId) statusBar = miuiPhoneStatusBarView.findViewById(statusBarId)
val statusBarContents: ViewGroup = miuiPhoneStatusBarView.findViewById(statusBarContentsId) val statusBarContents: ViewGroup =
miuiPhoneStatusBarView.findViewById(statusBarContentsId)
if (statusBar == null) return@hookAfter if (statusBar == null) return@hookAfter
val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId) val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId)
val phoneStatusBarLeftContainer: ViewGroup = miuiPhoneStatusBarView.findViewById( val phoneStatusBarLeftContainer: ViewGroup =
phoneStatusBarLeftContainerId miuiPhoneStatusBarView.findViewById(phoneStatusBarLeftContainerId)
) val fullscreenNotificationIconArea: ViewGroup =
val fullscreenNotificationIconArea: ViewGroup = miuiPhoneStatusBarView.findViewById( miuiPhoneStatusBarView.findViewById(fullscreenNotificationIconAreaId)
fullscreenNotificationIconAreaId val systemIconArea: ViewGroup =
) miuiPhoneStatusBarView.findViewById(systemIconAreaId)
val systemIconArea: ViewGroup = miuiPhoneStatusBarView.findViewById(systemIconAreaId) val statusIcons: ViewGroup =
val statusIcons: ViewGroup = miuiPhoneStatusBarView.findViewById(statusIconsId) miuiPhoneStatusBarView.findViewById(statusIconsId)
val systemIcons: ViewGroup = miuiPhoneStatusBarView.findViewById(systemIconsId) val systemIcons: ViewGroup =
val battery: ViewGroup = miuiPhoneStatusBarView.findViewById(batteryId) miuiPhoneStatusBarView.findViewById(systemIconsId)
val battery: ViewGroup =
miuiPhoneStatusBarView.findViewById(batteryId)
(clock.parent as ViewGroup).removeView(clock) (clock.parent as ViewGroup).removeView(clock)
(phoneStatusBarLeftContainer.parent as ViewGroup).removeView( (phoneStatusBarLeftContainer.parent as ViewGroup).removeView(
@@ -349,9 +299,11 @@ object StatusBarLayoutForS : HookRegister() {
fullscreenNotificationIconArea fullscreenNotificationIconArea
) )
val mConstraintLayout = ConstraintLayout(context).also { val mConstraintLayout =
ConstraintLayout(context).also {
it.layoutParams = ConstraintLayout.LayoutParams( it.layoutParams = ConstraintLayout.LayoutParams(
ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT ConstraintLayout.LayoutParams.MATCH_PARENT,
ConstraintLayout.LayoutParams.MATCH_PARENT
) )
} }
@@ -360,14 +312,16 @@ object StatusBarLayoutForS : HookRegister() {
battery.layoutParams = ConstraintLayout.LayoutParams( battery.layoutParams = ConstraintLayout.LayoutParams(
ConstraintLayout.LayoutParams.WRAP_CONTENT, ConstraintLayout.LayoutParams.MATCH_PARENT ConstraintLayout.LayoutParams.WRAP_CONTENT,
ConstraintLayout.LayoutParams.MATCH_PARENT
).also { ).also {
it.endToEnd = 0 it.endToEnd = 0
} }
fullscreenNotificationIconArea.layoutParams = ConstraintLayout.LayoutParams( fullscreenNotificationIconArea.layoutParams = ConstraintLayout.LayoutParams(
0, ConstraintLayout.LayoutParams.MATCH_PARENT 0,
ConstraintLayout.LayoutParams.MATCH_PARENT
).also { ).also {
it.startToEnd = batteryId it.startToEnd = batteryId
it.endToEnd = 0 it.endToEnd = 0
@@ -377,25 +331,24 @@ object StatusBarLayoutForS : HookRegister() {
//增加一个左对齐布局 //增加一个左对齐布局
mLeftLayout = LinearLayout(context) mLeftLayout = LinearLayout(context)
val leftLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val leftLp: LinearLayout.LayoutParams =
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
)
mLeftLayout!!.layoutParams = leftLp mLeftLayout!!.layoutParams = leftLp
mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL
//增加一个居中布局 //增加一个居中布局
mCenterLayout = LinearLayout(context) mCenterLayout = LinearLayout(context)
val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.MATCH_PARENT
) )
mCenterLayout!!.layoutParams = centerLp mCenterLayout!!.layoutParams = centerLp
mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL
//增加一个右布局 //增加一个右布局
mRightLayout = LinearLayout(context) mRightLayout = LinearLayout(context)
val rightLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val rightLp: LinearLayout.LayoutParams =
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
)
mRightLayout!!.layoutParams = rightLp mRightLayout!!.layoutParams = rightLp
mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL
@@ -422,7 +375,7 @@ object StatusBarLayoutForS : HookRegister() {
statusBarBottom = statusBar!!.paddingBottom statusBarBottom = statusBar!!.paddingBottom
if (isCompatibilityMode) { if (getHoleLocation == 2) {
val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0) val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0)
if (customLeftMargin != 0) { if (customLeftMargin != 0) {
statusBarLeft = customLeftMargin statusBarLeft = customLeftMargin
@@ -432,16 +385,16 @@ object StatusBarLayoutForS : HookRegister() {
if (customRightMargin != 0) { if (customRightMargin != 0) {
statusBarRight = customRightMargin statusBarRight = customRightMargin
} }
updateLayout(context,2) updateLayout(context)
} }
} }
//兼容模式 //兼容模式
findMethod("com.android.systemui.statusbar.phone.PhoneStatusBarView") { findMethod("com.android.systemui.statusbar.phone.PhoneStatusBarView") {
name == "updateLayoutForCutout" name == "updateLayoutForCutout"
}.hookAfter { }.hookAfter {
if (isCompatibilityMode) { if (getHoleLocation == 2) {
val context = (it.thisObject as ViewGroup).context val context = (it.thisObject as ViewGroup).context
updateLayout(context,2) updateLayout(context)
} }
} }
@@ -451,10 +404,12 @@ object StatusBarLayoutForS : HookRegister() {
}.hookAfter { }.hookAfter {
val miuiPhoneStatusBarView = it.thisObject.getObjectAs<ViewGroup>("mStatusBar") val miuiPhoneStatusBarView = it.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val res = miuiPhoneStatusBarView.resources val res = miuiPhoneStatusBarView.resources
val statusBarId = res.getIdentifier("status_bar", "id", "com.android.systemui") val statusBarId =
res.getIdentifier("status_bar", "id", "com.android.systemui")
val statusBar1 = miuiPhoneStatusBarView.findViewById<ViewGroup>(statusBarId) val statusBar1 = miuiPhoneStatusBarView.findViewById<ViewGroup>(statusBarId)
//非锁屏下整个状态栏布局 //非锁屏下整个状态栏布局
val keyguardMgr = statusBar1.context.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager val keyguardMgr =
statusBar1.context.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager
if (keyguardMgr.isKeyguardLocked) { if (keyguardMgr.isKeyguardLocked) {
statusBar1!!.visibility = View.GONE statusBar1!!.visibility = View.GONE
} else { } else {

View File

@@ -2,10 +2,12 @@ package com.lt2333.simplicitytools.hooks.rules.s.systemui
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.content.res.Resources
import android.os.Handler import android.os.Handler
import android.provider.Settings import android.provider.Settings
import android.util.TypedValue import android.util.TypedValue
import android.view.Gravity import android.view.Gravity
import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import com.github.kyuubiran.ezxhelper.utils.* import com.github.kyuubiran.ezxhelper.utils.*
import com.lt2333.simplicitytools.utils.XSPUtils import com.lt2333.simplicitytools.utils.XSPUtils
@@ -14,7 +16,6 @@ import java.lang.reflect.Method
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
object StatusBarTimeCustomizationForS : HookRegister() { object StatusBarTimeCustomizationForS : HookRegister() {
private val getMode = XSPUtils.getInt("custom_clock_mode", 0) private val getMode = XSPUtils.getInt("custom_clock_mode", 0)
@@ -29,12 +30,14 @@ object StatusBarTimeCustomizationForS : HookRegister() {
private val isSecond = XSPUtils.getBoolean("status_bar_time_seconds", false) private val isSecond = XSPUtils.getBoolean("status_bar_time_seconds", false)
private val isDoubleHour = XSPUtils.getBoolean("status_bar_time_double_hour", false) private val isDoubleHour = XSPUtils.getBoolean("status_bar_time_double_hour", false)
private val isPeriod = XSPUtils.getBoolean("status_bar_time_period", true) private val isPeriod = XSPUtils.getBoolean("status_bar_time_period", true)
private val isCenterAlign = XSPUtils.getBoolean("status_bar_time_double_line_center_align", false) private val isCenterAlign =
XSPUtils.getBoolean("status_bar_time_double_line_center_align", false)
//极客模式 //极客模式
private val getGeekClockSize = XSPUtils.getInt("status_bar_clock_size_geek", 0) private val getGeekClockSize = XSPUtils.getInt("status_bar_clock_size_geek", 0)
private val getGeekFormat = XSPUtils.getString("custom_clock_format_geek", "HH:mm:ss") private val getGeekFormat = XSPUtils.getString("custom_clock_format_geek", "HH:mm:ss")
private val isGeekCenterAlign = XSPUtils.getBoolean("status_bar_time_center_align_geek", false) private val isGeekCenterAlign =
XSPUtils.getBoolean("status_bar_time_center_align_geek", false)
private lateinit var nowTime: Date private lateinit var nowTime: Date
private var str = "" private var str = ""
@@ -80,7 +83,9 @@ object StatusBarTimeCustomizationForS : HookRegister() {
} }
} }
Timer().scheduleAtFixedRate( Timer().scheduleAtFixedRate(
T(), 1000 - System.currentTimeMillis() % 1000, 1000 T(),
1000 - System.currentTimeMillis() % 1000,
1000
) )
} catch (_: Exception) { } catch (_: Exception) {
} }
@@ -93,7 +98,8 @@ object StatusBarTimeCustomizationForS : HookRegister() {
val textV = it.thisObject as TextView val textV = it.thisObject as TextView
if (textV.resources.getResourceEntryName(textV.id) == "clock") { if (textV.resources.getResourceEntryName(textV.id) == "clock") {
val t = Settings.System.getString( val t = Settings.System.getString(
c!!.contentResolver, Settings.System.TIME_12_24 c!!.contentResolver,
Settings.System.TIME_12_24
) )
val is24 = t == "24" val is24 = t == "24"
nowTime = Calendar.getInstance().time nowTime = Calendar.getInstance().time
@@ -104,18 +110,15 @@ object StatusBarTimeCustomizationForS : HookRegister() {
} }
if (isCenterAlign) { if (isCenterAlign) {
findConstructor("com.android.systemui.statusbar.views.MiuiClock") { findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") {
paramCount == 3 name == "onViewCreated" && parameterCount == 2
}.hookAfter { }.hookAfter {
try { val miuiPhoneStatusBarView =
val textV = it.thisObject as TextView it.thisObject.getObject("mStatusBar") as ViewGroup
if (textV.resources.getResourceEntryName(textV.id) == "clock") { val res: Resources = miuiPhoneStatusBarView.resources
c = it.args[0] as Context val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui")
val textV = it.thisObject as TextView val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId)
textV.gravity = Gravity.CENTER clock.gravity = Gravity.CENTER
}
} catch (_: Exception) {
}
} }
} }
} }
@@ -149,7 +152,9 @@ object StatusBarTimeCustomizationForS : HookRegister() {
} }
} }
Timer().scheduleAtFixedRate( Timer().scheduleAtFixedRate(
T(), 1000 - System.currentTimeMillis() % 1000, 1000 T(),
1000 - System.currentTimeMillis() % 1000,
1000
) )
} catch (_: Exception) { } catch (_: Exception) {
} }
@@ -157,38 +162,27 @@ object StatusBarTimeCustomizationForS : HookRegister() {
findMethod("com.android.systemui.statusbar.views.MiuiClock") { findMethod("com.android.systemui.statusbar.views.MiuiClock") {
name == "updateTime" name == "updateTime"
}.hookBefore { }.hookAfter {
try { try {
val textV = it.thisObject as TextView val textV = it.thisObject as TextView
if (textV.resources.getResourceEntryName(textV.id) == "clock") { if (textV.resources.getResourceEntryName(textV.id) == "clock") {
val mMiuiStatusBarClockController = textV.getObject("mMiuiStatusBarClockController") nowTime = Calendar.getInstance().time
val mCalendar = mMiuiStatusBarClockController.invokeMethodAuto("getCalendar") textV.text = SimpleDateFormat(getGeekFormat).format(nowTime)
mCalendar?.invokeMethodAuto(
"setTimeInMillis", System.currentTimeMillis()
)
val textSb = StringBuilder()
val formatSb = StringBuilder(getGeekFormat.toString())
mCalendar?.invokeMethodAuto("format", c, textSb, formatSb)
textV.text = textSb.toString()
it.result = null
} }
} catch (_: Exception) { } catch (_: Exception) {
} }
} }
if (isGeekCenterAlign) { if (isGeekCenterAlign) {
findConstructor("com.android.systemui.statusbar.views.MiuiClock") { findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") {
paramCount == 3 name == "onViewCreated" && parameterCount == 2
}.hookAfter { }.hookAfter {
try { val miuiPhoneStatusBarView =
val textV = it.thisObject as TextView it.thisObject.getObject("mStatusBar") as ViewGroup
if (textV.resources.getResourceEntryName(textV.id) == "clock") { val res: Resources = miuiPhoneStatusBarView.resources
c = it.args[0] as Context val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui")
val textV = it.thisObject as TextView val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId)
textV.gravity = Gravity.CENTER clock.gravity = Gravity.CENTER
}
} catch (_: Exception) {
}
} }
} }
} }
@@ -203,6 +197,7 @@ object StatusBarTimeCustomizationForS : HookRegister() {
if (isYear) { if (isYear) {
if (isZh) { if (isZh) {
datePattern += "YY年" datePattern += "YY年"
// if (!isHideSpace) datePattern = "$datePattern "
} else { } else {
datePattern += "YY" datePattern += "YY"
if (isMonth || isDay) datePattern += "/" if (isMonth || isDay) datePattern += "/"
@@ -211,6 +206,7 @@ object StatusBarTimeCustomizationForS : HookRegister() {
if (isMonth) { if (isMonth) {
if (isZh) { if (isZh) {
datePattern += "M月" datePattern += "M月"
// if (!isHideSpace) datePattern = "$datePattern "
} else { } else {
datePattern += "M" datePattern += "M"
if (isDay) datePattern += "/" if (isDay) datePattern += "/"

View File

@@ -1,16 +0,0 @@
package com.lt2333.simplicitytools.hooks.rules.t.systemui
import com.github.kyuubiran.ezxhelper.utils.findMethod
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import com.lt2333.simplicitytools.utils.hasEnable
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
object DisableBluetoothTemporarilyOffForT: HookRegister() {
override fun init()= hasEnable("disable_bluetooth_temporarily_off") {
findMethod("com.android.settingslib.bluetooth.LocalBluetoothAdapter"){
name == "isSupportBluetoothRestrict" && parameterCount==1
}.hookBefore {
it.result = false
}
}
}

View File

@@ -3,8 +3,11 @@ package com.lt2333.simplicitytools.hooks.rules.t.systemui
import android.content.Context import android.content.Context
import android.content.res.Resources import android.content.res.Resources
import android.graphics.Typeface import android.graphics.Typeface
import android.view.View import android.util.TypedValue
import android.view.Gravity
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView import android.widget.TextView
import com.github.kyuubiran.ezxhelper.utils.* import com.github.kyuubiran.ezxhelper.utils.*
import com.lt2333.simplicitytools.utils.XSPUtils import com.lt2333.simplicitytools.utils.XSPUtils
@@ -14,12 +17,11 @@ import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
object StatusBarBigMobileTypeIconForT : HookRegister() { object StatusBarBigMobileTypeIconForT : HookRegister() {
private val getLocation = XSPUtils.getInt("big_mobile_type_location", 1)
private val upAndDownPosition = XSPUtils.getInt("big_mobile_type_icon_up_and_down_position", 0) private val upAndDownPosition = XSPUtils.getInt("big_mobile_type_icon_up_and_down_position", 0)
private val leftAndRightMargin = XSPUtils.getInt("big_mobile_type_icon_left_and_right_margins", 0) private val leftAndRightMargin =
XSPUtils.getInt("big_mobile_type_icon_left_and_right_margins", 0)
private val isBold = XSPUtils.getBoolean("big_mobile_type_icon_bold", true) private val isBold = XSPUtils.getBoolean("big_mobile_type_icon_bold", true)
private val size = XSPUtils.getFloat("big_mobile_type_icon_size", 12.5f) private val size = XSPUtils.getFloat("big_mobile_type_icon_size", 12.5f)
private val isOnlyShowNetwork = XSPUtils.getBoolean("big_mobile_type_only_show_network_card", false)
override fun init() = hasEnable("big_mobile_type_icon") { override fun init() = hasEnable("big_mobile_type_icon") {
//使网络类型单独显示 //使网络类型单独显示
@@ -31,59 +33,42 @@ object StatusBarBigMobileTypeIconForT : HookRegister() {
} }
findMethod("com.android.systemui.statusbar.StatusBarMobileView") { findMethod("com.android.systemui.statusbar.StatusBarMobileView") {
name == "initViewState" name == "init"
}.hookAfter { }.hookAfter {
val mobileIconState = it.args[0]
val statusBarMobileView = it.thisObject as ViewGroup val statusBarMobileView = it.thisObject as ViewGroup
val context: Context = statusBarMobileView.context val context: Context = statusBarMobileView.context
val res: Resources = context.resources val res: Resources = context.resources
//获取组件 //获取组件
val mobileContainerLeftId: Int = res.getIdentifier("mobile_container_left", "id", "com.android.systemui") val mobileContainerLeftId: Int =
val mobileContainerLeft = statusBarMobileView.findViewById<ViewGroup>(mobileContainerLeftId) res.getIdentifier("mobile_container_left", "id", "com.android.systemui")
val mobileContainerLeft =
statusBarMobileView.findViewById<ViewGroup>(mobileContainerLeftId)
val mobileGroupId: Int = res.getIdentifier("mobile_group", "id", "com.android.systemui") val mobileGroupId: Int =
val mobileGroup = statusBarMobileView.findViewById<ViewGroup>(mobileGroupId) res.getIdentifier("mobile_group", "id", "com.android.systemui")
val mobileGroup =
statusBarMobileView.findViewById<ViewGroup>(mobileGroupId)
val mobileTypeSingleId: Int = res.getIdentifier("mobile_type_single", "id", "com.android.systemui") val mobileTypeSingleId: Int =
res.getIdentifier("mobile_type_single", "id", "com.android.systemui")
val mobileTypeSingle = statusBarMobileView.findViewById<TextView>(mobileTypeSingleId) val mobileTypeSingle = statusBarMobileView.findViewById<TextView>(mobileTypeSingleId)
//更改顺序 //更改顺序
if (getLocation == 1) {
mobileGroup.removeView(mobileTypeSingle) mobileGroup.removeView(mobileTypeSingle)
mobileGroup.addView(mobileTypeSingle) mobileGroup.addView(mobileTypeSingle)
mobileGroup.removeView(mobileContainerLeft) mobileGroup.removeView(mobileContainerLeft)
mobileGroup.addView(mobileContainerLeft) mobileGroup.addView(mobileContainerLeft)
}
//更改样式 //更改样式
mobileTypeSingle.textSize = size mobileTypeSingle.textSize = size
if (isBold){ if (isBold){
mobileTypeSingle.typeface = Typeface.DEFAULT_BOLD mobileTypeSingle.typeface = Typeface.DEFAULT_BOLD
} }
mobileTypeSingle.setPadding( mobileTypeSingle.setPadding(leftAndRightMargin, upAndDownPosition,
leftAndRightMargin, upAndDownPosition, leftAndRightMargin, 0 leftAndRightMargin,0)
) }
}
it.thisObject.invokeMethodAuto("updateState",mobileIconState)
}
//显示非上网卡的大图标
if (!isOnlyShowNetwork) {
findMethod("com.android.systemui.statusbar.StatusBarMobileView") {
name == "updateState"
}.hookAfter {
val mobileIconState = it.args[0]
val statusBarMobileView = it.thisObject as ViewGroup
val context: Context = statusBarMobileView.context
val res: Resources = context.resources
val mobileTypeSingleId: Int = res.getIdentifier("mobile_type_single", "id", "com.android.systemui")
val mobileTypeSingle = statusBarMobileView.findViewById<TextView>(mobileTypeSingleId)
if (!mobileIconState.getObjectAs<Boolean>("dataConnected") && !mobileIconState.getObjectAs<Boolean>("wifiAvailable")) {
mobileTypeSingle.visibility = View.VISIBLE
}
}
}
}
} }

View File

@@ -16,11 +16,10 @@ import com.lt2333.simplicitytools.utils.XSPUtils
import com.lt2333.simplicitytools.utils.hasEnable import com.lt2333.simplicitytools.utils.hasEnable
import com.lt2333.simplicitytools.utils.xposed.base.HookRegister import com.lt2333.simplicitytools.utils.xposed.base.HookRegister
object StatusBarLayoutForT : HookRegister() { object StatusBarLayoutForT : HookRegister() {
private val getMode = XSPUtils.getInt("status_bar_layout_mode", 0) private val getMode = XSPUtils.getInt("status_bar_layout_mode", 0)
private val isCompatibilityMode = XSPUtils.getBoolean("layout_compatibility_mode", false) private val getHoleLocation = XSPUtils.getInt("screen_hole_location", 0)
private var statusBarLeft = 0 private var statusBarLeft = 0
private var statusBarTop = 0 private var statusBarTop = 0
@@ -28,120 +27,80 @@ object StatusBarLayoutForT : HookRegister() {
private var statusBarBottom = 0 private var statusBarBottom = 0
override fun init() { override fun init() {
// TODO: Android13状态栏布局不可用
var mLeftLayout: LinearLayout? = null var mLeftLayout: LinearLayout? = null
var mRightLayout: LinearLayout? = null var mRightLayout: LinearLayout? = null
var mCenterLayout: LinearLayout? var mCenterLayout: LinearLayout?
var statusBar: ViewGroup? = null var statusBar: ViewGroup? = null
//判断屏幕状态更新布局 mode: 1正常布局 2居中布局 fun updateLayout(context: Context) {
fun updateLayout(context: Context,mode: Int) { //判断屏幕方向
when(mode){
1->{
val mConfiguration: Configuration = context.resources.configuration val mConfiguration: Configuration = context.resources.configuration
if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) { //横屏 if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) {
statusBar!!.setPadding(statusBarLeft, statusBarTop, statusBarRight, statusBarBottom)
}
}
2->{
val mConfiguration: Configuration = context.resources.configuration
if (mConfiguration.orientation == Configuration.ORIENTATION_PORTRAIT) { //横屏
mLeftLayout!!.setPadding(statusBarLeft, 0, 0, 0) mLeftLayout!!.setPadding(statusBarLeft, 0, 0, 0)
mRightLayout!!.setPadding(0, 0, statusBarRight, 0) mRightLayout!!.setPadding(0, 0, statusBarRight, 0)
statusBar!!.setPadding(0, statusBarTop, 0, statusBarBottom) statusBar!!.setPadding(0, statusBarTop, 0, statusBarBottom)
}else{ //竖屏 } else {
mLeftLayout!!.setPadding(0, 0, 0, 0) //横屏状态
mRightLayout!!.setPadding(0, 0, 0, 0) mLeftLayout!!.setPadding(175, 0, 0, 0)
} mRightLayout!!.setPadding(0, 0, 175, 0)
} statusBar!!.setPadding(0, statusBarTop, 0, statusBarBottom)
} }
} }
//判断是否开启挖孔兼容模式 //判断是否开启居中挖孔兼容模式
if (isCompatibilityMode) { if (getHoleLocation == 1) {
findMethod("com.android.systemui.ScreenDecorations") { findMethod("com.android.systemui.ScreenDecorations\$DisplayCutoutView") {
name == "boundsFromDirection" && parameterCount == 3 && isStatic name == "boundsFromDirection" && parameterCount == 3 && isStatic
}.hookBefore { }.hookBefore {
it.args[1] = 0 it.args[1] = 0
} }
} }
//修改对应布局
when (getMode) { when (getMode) {
//默认 //默认
0 -> { 0 -> return
findMethod("com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment") {
name == "onViewCreated" && parameterCount == 2
}.hookAfter { param ->
val miuiPhoneStatusBarView = param.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val context: Context = miuiPhoneStatusBarView.context
val res: Resources = miuiPhoneStatusBarView.resources
val statusBarId: Int = res.getIdentifier("status_bar", "id", "com.android.systemui")
statusBar = miuiPhoneStatusBarView.findViewById(statusBarId)
if (statusBar == null) return@hookAfter
statusBarLeft = statusBar!!.paddingLeft
statusBarTop = statusBar!!.paddingTop
statusBarRight = statusBar!!.paddingRight
statusBarBottom = statusBar!!.paddingBottom
if (isCompatibilityMode) {
val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0)
if (customLeftMargin != 0) {
statusBarLeft = customLeftMargin
}
val customRightMargin = XSPUtils.getInt("status_bar_right_margin", 0)
if (customRightMargin != 0) {
statusBarRight = customRightMargin
}
updateLayout(context,1)
}
}
//兼容模式
findMethod("com.android.systemui.statusbar.phone.PhoneStatusBarView") {
name == "updateLayoutForCutout"
}.hookAfter {
if (isCompatibilityMode) {
val context = (it.thisObject as ViewGroup).context
updateLayout(context,1)
}
}
}
//时钟居中 //时钟居中
1 -> { 1 -> {
findMethod("com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment") { findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") {
name == "onViewCreated" && parameterCount == 2 name == "onViewCreated" && parameterCount == 2
}.hookAfter { param -> }.hookAfter { param ->
val miuiPhoneStatusBarView = param.thisObject.getObjectAs<ViewGroup>("mStatusBar") val miuiPhoneStatusBarView =
param.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val context: Context = miuiPhoneStatusBarView.context val context: Context = miuiPhoneStatusBarView.context
val res: Resources = miuiPhoneStatusBarView.resources val res: Resources = miuiPhoneStatusBarView.resources
val statusBarId: Int = res.getIdentifier("status_bar", "id", "com.android.systemui") val statusBarId: Int =
val statusBarContentsId: Int = res.getIdentifier( res.getIdentifier("status_bar", "id", "com.android.systemui")
"status_bar_contents", "id", "com.android.systemui" val statusBarContentsId: Int =
) res.getIdentifier("status_bar_contents", "id", "com.android.systemui")
val systemIconAreaId: Int = res.getIdentifier("system_icon_area", "id", "com.android.systemui") val systemIconAreaId: Int =
res.getIdentifier("system_icon_area", "id", "com.android.systemui")
val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui") val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui")
val phoneStatusBarLeftContainerId: Int = res.getIdentifier( val phoneStatusBarLeftContainerId: Int =
"phone_status_bar_left_container", "id", "com.android.systemui" res.getIdentifier(
"phone_status_bar_left_container",
"id",
"com.android.systemui"
) )
val notificationIconAreaInnerId: Int = res.getIdentifier( val notificationIconAreaInnerId: Int =
"notification_icon_area_inner", "id", "com.android.systemui" res.getIdentifier(
"notification_icon_area_inner",
"id",
"com.android.systemui"
) )
statusBar = miuiPhoneStatusBarView.findViewById(statusBarId) statusBar = miuiPhoneStatusBarView.findViewById(statusBarId)
val statusBarContents: ViewGroup = miuiPhoneStatusBarView.findViewById(statusBarContentsId) val statusBarContents: ViewGroup =
miuiPhoneStatusBarView.findViewById(statusBarContentsId)
if (statusBar == null) return@hookAfter if (statusBar == null) return@hookAfter
val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId) val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId)
val phoneStatusBarLeftContainer: ViewGroup = miuiPhoneStatusBarView.findViewById( val phoneStatusBarLeftContainer: ViewGroup =
phoneStatusBarLeftContainerId miuiPhoneStatusBarView.findViewById(phoneStatusBarLeftContainerId)
) val notificationIconAreaInner: ViewGroup =
val notificationIconAreaInner: ViewGroup = miuiPhoneStatusBarView.findViewById( miuiPhoneStatusBarView.findViewById(notificationIconAreaInnerId)
notificationIconAreaInnerId val systemIconArea: ViewGroup =
) miuiPhoneStatusBarView.findViewById(systemIconAreaId)
val systemIconArea: ViewGroup = miuiPhoneStatusBarView.findViewById(systemIconAreaId)
(clock.parent as ViewGroup).removeView(clock) (clock.parent as ViewGroup).removeView(clock)
(phoneStatusBarLeftContainer.parent as ViewGroup).removeView( (phoneStatusBarLeftContainer.parent as ViewGroup).removeView(
@@ -152,39 +111,41 @@ object StatusBarLayoutForT : HookRegister() {
) )
(systemIconArea.parent as ViewGroup).removeView(systemIconArea) (systemIconArea.parent as ViewGroup).removeView(systemIconArea)
val mConstraintLayout = ConstraintLayout(context).also { val mConstraintLayout =
ConstraintLayout(context).also {
it.layoutParams = ConstraintLayout.LayoutParams( it.layoutParams = ConstraintLayout.LayoutParams(
ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT ConstraintLayout.LayoutParams.MATCH_PARENT,
ConstraintLayout.LayoutParams.MATCH_PARENT
) )
} }
mConstraintLayout.addView(notificationIconAreaInner) mConstraintLayout.addView(notificationIconAreaInner)
val fullscreenNotificationIconAreaLp = LinearLayout.LayoutParams( val fullscreenNotificationIconAreaLp = LinearLayout.LayoutParams(
ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT ConstraintLayout.LayoutParams.MATCH_PARENT,
ConstraintLayout.LayoutParams.MATCH_PARENT
) )
notificationIconAreaInner.layoutParams = fullscreenNotificationIconAreaLp notificationIconAreaInner.layoutParams = fullscreenNotificationIconAreaLp
//增加一个左对齐布局 //增加一个左对齐布局
mLeftLayout = LinearLayout(context) mLeftLayout = LinearLayout(context)
val leftLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val leftLp: LinearLayout.LayoutParams =
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
)
mLeftLayout!!.layoutParams = leftLp mLeftLayout!!.layoutParams = leftLp
mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL
//增加一个居中布局 //增加一个居中布局
mCenterLayout = LinearLayout(context) mCenterLayout = LinearLayout(context)
val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.MATCH_PARENT
) )
mCenterLayout!!.layoutParams = centerLp mCenterLayout!!.layoutParams = centerLp
mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL
mRightLayout = LinearLayout(context) mRightLayout = LinearLayout(context)
val rightLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val rightLp: LinearLayout.LayoutParams =
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
)
mRightLayout!!.layoutParams = rightLp mRightLayout!!.layoutParams = rightLp
mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL
mLeftLayout!!.addView(phoneStatusBarLeftContainer) mLeftLayout!!.addView(phoneStatusBarLeftContainer)
@@ -202,7 +163,7 @@ object StatusBarLayoutForT : HookRegister() {
statusBarBottom = statusBar!!.paddingBottom statusBarBottom = statusBar!!.paddingBottom
if (isCompatibilityMode) { if (getHoleLocation == 2) {
val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0) val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0)
if (customLeftMargin != 0) { if (customLeftMargin != 0) {
statusBarLeft = customLeftMargin statusBarLeft = customLeftMargin
@@ -212,7 +173,7 @@ object StatusBarLayoutForT : HookRegister() {
if (customRightMargin != 0) { if (customRightMargin != 0) {
statusBarRight = customRightMargin statusBarRight = customRightMargin
} }
updateLayout(context,2) updateLayout(context)
} }
} }
@@ -221,21 +182,23 @@ object StatusBarLayoutForT : HookRegister() {
}.hookAfter { }.hookAfter {
hasEnable("layout_compatibility_mode") { hasEnable("layout_compatibility_mode") {
val context = (it.thisObject as ViewGroup).context val context = (it.thisObject as ViewGroup).context
updateLayout(context,2) updateLayout(context)
} }
} }
} }
//时钟居右 //时钟居右
2 -> { 2 -> {
findMethod("com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment") { findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") {
name == "onViewCreated" && parameterCount == 2 name == "onViewCreated" && parameterCount == 2
}.hookAfter { param -> }.hookAfter { param ->
val miuiPhoneStatusBarView = param.thisObject.getObjectAs<ViewGroup>("mStatusBar") val miuiPhoneStatusBarView =
param.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val context: Context = miuiPhoneStatusBarView.context val context: Context = miuiPhoneStatusBarView.context
val res: Resources = miuiPhoneStatusBarView.resources val res: Resources = miuiPhoneStatusBarView.resources
//组件ID //组件ID
val statusBarId: Int = res.getIdentifier("status_bar", "id", "com.android.systemui") val statusBarId: Int =
res.getIdentifier("status_bar", "id", "com.android.systemui")
val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui") val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui")
val batteryId: Int = res.getIdentifier("battery", "id", "com.android.systemui") val batteryId: Int = res.getIdentifier("battery", "id", "com.android.systemui")
@@ -247,7 +210,8 @@ object StatusBarLayoutForT : HookRegister() {
//新建布局 //新建布局
val rightLp = LinearLayout.LayoutParams( val rightLp = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.MATCH_PARENT
).also { ).also {
it.marginStart = dp2px(context, 5f) it.marginStart = dp2px(context, 5f)
} }
@@ -259,82 +223,72 @@ object StatusBarLayoutForT : HookRegister() {
battery.addView(mRightLayout) battery.addView(mRightLayout)
(clock.parent as ViewGroup).removeView(clock) (clock.parent as ViewGroup).removeView(clock)
mRightLayout!!.addView(clock) mRightLayout!!.addView(clock)
statusBarLeft = statusBar!!.paddingLeft
statusBarTop = statusBar!!.paddingTop
statusBarRight = statusBar!!.paddingRight
statusBarBottom = statusBar!!.paddingBottom
if (isCompatibilityMode) {
val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0)
if (customLeftMargin != 0) {
statusBarLeft = customLeftMargin
}
val customRightMargin = XSPUtils.getInt("status_bar_right_margin", 0)
if (customRightMargin != 0) {
statusBarRight = customRightMargin
}
updateLayout(context,1)
}
}
//兼容模式
findMethod("com.android.systemui.statusbar.phone.PhoneStatusBarView") {
name == "updateLayoutForCutout"
}.hookAfter {
if (isCompatibilityMode) {
val context = (it.thisObject as ViewGroup).context
updateLayout(context,1)
}
} }
} }
//时钟居中+图标居左 //时钟居中+图标居左
3 -> { 3 -> {
findMethod("com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment") { findMethod("com.android.systemui.statusbar.phone.CollapsedStatusBarFragment") {
name == "onViewCreated" && parameterCount == 2 name == "onViewCreated" && parameterCount == 2
}.hookAfter { param -> }.hookAfter { param ->
val miuiPhoneStatusBarView = param.thisObject.getObjectAs<ViewGroup>("mStatusBar") val miuiPhoneStatusBarView =
param.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val context: Context = miuiPhoneStatusBarView.context val context: Context = miuiPhoneStatusBarView.context
val res: Resources = miuiPhoneStatusBarView.resources val res: Resources = miuiPhoneStatusBarView.resources
val statusBarId: Int = res.getIdentifier("status_bar", "id", "com.android.systemui") val statusBarId: Int =
val statusBarContentsId: Int = res.getIdentifier( res.getIdentifier("status_bar", "id", "com.android.systemui")
"status_bar_contents", "id", "com.android.systemui" val statusBarContentsId: Int =
) res.getIdentifier("status_bar_contents", "id", "com.android.systemui")
val systemIconAreaId: Int = res.getIdentifier("system_icon_area", "id", "com.android.systemui") val systemIconAreaId: Int =
res.getIdentifier("system_icon_area", "id", "com.android.systemui")
val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui") val clockId: Int = res.getIdentifier("clock", "id", "com.android.systemui")
val phoneStatusBarLeftContainerId: Int = res.getIdentifier( val phoneStatusBarLeftContainerId: Int =
"phone_status_bar_left_container", "id", "com.android.systemui" res.getIdentifier(
"phone_status_bar_left_container",
"id",
"com.android.systemui"
) )
val fullscreenNotificationIconAreaId: Int = res.getIdentifier( val fullscreenNotificationIconAreaId: Int =
"fullscreen_notification_icon_area", "id", "com.android.systemui" res.getIdentifier(
"fullscreen_notification_icon_area",
"id",
"com.android.systemui"
) )
val statusIconsId: Int = res.getIdentifier( val statusIconsId: Int =
"statusIcons", "id", "com.android.systemui" res.getIdentifier(
"statusIcons",
"id",
"com.android.systemui"
) )
val systemIconsId: Int = res.getIdentifier( val systemIconsId: Int =
"system_icons", "id", "com.android.systemui" res.getIdentifier(
"system_icons",
"id",
"com.android.systemui"
) )
val batteryId: Int = res.getIdentifier( val batteryId: Int =
"battery", "id", "com.android.systemui" res.getIdentifier(
"battery",
"id",
"com.android.systemui"
) )
statusBar = miuiPhoneStatusBarView.findViewById(statusBarId) statusBar = miuiPhoneStatusBarView.findViewById(statusBarId)
val statusBarContents: ViewGroup = miuiPhoneStatusBarView.findViewById(statusBarContentsId) val statusBarContents: ViewGroup =
miuiPhoneStatusBarView.findViewById(statusBarContentsId)
if (statusBar == null) return@hookAfter if (statusBar == null) return@hookAfter
val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId) val clock: TextView = miuiPhoneStatusBarView.findViewById(clockId)
val phoneStatusBarLeftContainer: ViewGroup = miuiPhoneStatusBarView.findViewById( val phoneStatusBarLeftContainer: ViewGroup =
phoneStatusBarLeftContainerId miuiPhoneStatusBarView.findViewById(phoneStatusBarLeftContainerId)
) val fullscreenNotificationIconArea: ViewGroup =
val fullscreenNotificationIconArea: ViewGroup = miuiPhoneStatusBarView.findViewById( miuiPhoneStatusBarView.findViewById(fullscreenNotificationIconAreaId)
fullscreenNotificationIconAreaId val systemIconArea: ViewGroup =
) miuiPhoneStatusBarView.findViewById(systemIconAreaId)
val systemIconArea: ViewGroup = miuiPhoneStatusBarView.findViewById(systemIconAreaId) val statusIcons: ViewGroup =
val statusIcons: ViewGroup = miuiPhoneStatusBarView.findViewById(statusIconsId) miuiPhoneStatusBarView.findViewById(statusIconsId)
val systemIcons: ViewGroup = miuiPhoneStatusBarView.findViewById(systemIconsId) val systemIcons: ViewGroup =
val battery: ViewGroup = miuiPhoneStatusBarView.findViewById(batteryId) miuiPhoneStatusBarView.findViewById(systemIconsId)
val battery: ViewGroup =
miuiPhoneStatusBarView.findViewById(batteryId)
(clock.parent as ViewGroup).removeView(clock) (clock.parent as ViewGroup).removeView(clock)
(phoneStatusBarLeftContainer.parent as ViewGroup).removeView( (phoneStatusBarLeftContainer.parent as ViewGroup).removeView(
@@ -348,9 +302,11 @@ object StatusBarLayoutForT : HookRegister() {
fullscreenNotificationIconArea fullscreenNotificationIconArea
) )
val mConstraintLayout = ConstraintLayout(context).also { val mConstraintLayout =
ConstraintLayout(context).also {
it.layoutParams = ConstraintLayout.LayoutParams( it.layoutParams = ConstraintLayout.LayoutParams(
ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT ConstraintLayout.LayoutParams.MATCH_PARENT,
ConstraintLayout.LayoutParams.MATCH_PARENT
) )
} }
@@ -359,14 +315,16 @@ object StatusBarLayoutForT : HookRegister() {
battery.layoutParams = ConstraintLayout.LayoutParams( battery.layoutParams = ConstraintLayout.LayoutParams(
ConstraintLayout.LayoutParams.WRAP_CONTENT, ConstraintLayout.LayoutParams.MATCH_PARENT ConstraintLayout.LayoutParams.WRAP_CONTENT,
ConstraintLayout.LayoutParams.MATCH_PARENT
).also { ).also {
it.endToEnd = 0 it.endToEnd = 0
} }
fullscreenNotificationIconArea.layoutParams = ConstraintLayout.LayoutParams( fullscreenNotificationIconArea.layoutParams = ConstraintLayout.LayoutParams(
0, ConstraintLayout.LayoutParams.MATCH_PARENT 0,
ConstraintLayout.LayoutParams.MATCH_PARENT
).also { ).also {
it.startToEnd = batteryId it.startToEnd = batteryId
it.endToEnd = 0 it.endToEnd = 0
@@ -376,25 +334,24 @@ object StatusBarLayoutForT : HookRegister() {
//增加一个左对齐布局 //增加一个左对齐布局
mLeftLayout = LinearLayout(context) mLeftLayout = LinearLayout(context)
val leftLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val leftLp: LinearLayout.LayoutParams =
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
)
mLeftLayout!!.layoutParams = leftLp mLeftLayout!!.layoutParams = leftLp
mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL mLeftLayout!!.gravity = Gravity.START or Gravity.CENTER_VERTICAL
//增加一个居中布局 //增加一个居中布局
mCenterLayout = LinearLayout(context) mCenterLayout = LinearLayout(context)
val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val centerLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.MATCH_PARENT
) )
mCenterLayout!!.layoutParams = centerLp mCenterLayout!!.layoutParams = centerLp
mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL mCenterLayout!!.gravity = Gravity.CENTER or Gravity.CENTER_VERTICAL
//增加一个右布局 //增加一个右布局
mRightLayout = LinearLayout(context) mRightLayout = LinearLayout(context)
val rightLp: LinearLayout.LayoutParams = LinearLayout.LayoutParams( val rightLp: LinearLayout.LayoutParams =
0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.MATCH_PARENT, 1.0f)
)
mRightLayout!!.layoutParams = rightLp mRightLayout!!.layoutParams = rightLp
mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL mRightLayout!!.gravity = Gravity.END or Gravity.CENTER_VERTICAL
@@ -421,7 +378,7 @@ object StatusBarLayoutForT : HookRegister() {
statusBarBottom = statusBar!!.paddingBottom statusBarBottom = statusBar!!.paddingBottom
if (isCompatibilityMode) { if (getHoleLocation == 2) {
val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0) val customLeftMargin = XSPUtils.getInt("status_bar_left_margin", 0)
if (customLeftMargin != 0) { if (customLeftMargin != 0) {
statusBarLeft = customLeftMargin statusBarLeft = customLeftMargin
@@ -431,16 +388,16 @@ object StatusBarLayoutForT : HookRegister() {
if (customRightMargin != 0) { if (customRightMargin != 0) {
statusBarRight = customRightMargin statusBarRight = customRightMargin
} }
updateLayout(context,2) updateLayout(context)
} }
} }
//兼容模式 //兼容模式
findMethod("com.android.systemui.statusbar.phone.PhoneStatusBarView") { findMethod("com.android.systemui.statusbar.phone.PhoneStatusBarView") {
name == "updateLayoutForCutout" name == "updateLayoutForCutout"
}.hookAfter { }.hookAfter {
if (isCompatibilityMode) { if (getHoleLocation == 2) {
val context = (it.thisObject as ViewGroup).context val context = (it.thisObject as ViewGroup).context
updateLayout(context,2) updateLayout(context)
} }
} }
@@ -450,24 +407,18 @@ object StatusBarLayoutForT : HookRegister() {
}.hookAfter { }.hookAfter {
val miuiPhoneStatusBarView = it.thisObject.getObjectAs<ViewGroup>("mStatusBar") val miuiPhoneStatusBarView = it.thisObject.getObjectAs<ViewGroup>("mStatusBar")
val res = miuiPhoneStatusBarView.resources val res = miuiPhoneStatusBarView.resources
val statusBarId = res.getIdentifier("status_bar", "id", "com.android.systemui") val statusBarId =
res.getIdentifier("status_bar", "id", "com.android.systemui")
val statusBar1 = miuiPhoneStatusBarView.findViewById<ViewGroup>(statusBarId) val statusBar1 = miuiPhoneStatusBarView.findViewById<ViewGroup>(statusBarId)
//非锁屏下整个状态栏布局 //非锁屏下整个状态栏布局
val keyguardMgr = statusBar1.context.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager val keyguardMgr =
statusBar1.context.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager
if (keyguardMgr.isKeyguardLocked) { if (keyguardMgr.isKeyguardLocked) {
statusBar1!!.visibility = View.GONE statusBar1!!.visibility = View.GONE
} else { } else {
statusBar1!!.visibility = View.VISIBLE statusBar1!!.visibility = View.VISIBLE
} }
} }
//TODO: 修改图标的顺序
/*findConstructor("com.android.systemui.statusbar.phone.StatusBarIconList") {
parameterCount == 1
}.hookBefore {
}*/
} }
} }
} }

View File

@@ -2,10 +2,12 @@ package com.lt2333.simplicitytools.hooks.rules.t.systemui
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.content.res.Resources
import android.os.Handler import android.os.Handler
import android.provider.Settings import android.provider.Settings
import android.util.TypedValue import android.util.TypedValue
import android.view.Gravity import android.view.Gravity
import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import com.github.kyuubiran.ezxhelper.utils.* import com.github.kyuubiran.ezxhelper.utils.*
import com.lt2333.simplicitytools.utils.XSPUtils import com.lt2333.simplicitytools.utils.XSPUtils
@@ -14,7 +16,6 @@ import java.lang.reflect.Method
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
object StatusBarTimeCustomizationForT : HookRegister() { object StatusBarTimeCustomizationForT : HookRegister() {
private val getMode = XSPUtils.getInt("custom_clock_mode", 0) private val getMode = XSPUtils.getInt("custom_clock_mode", 0)
@@ -29,12 +30,14 @@ object StatusBarTimeCustomizationForT : HookRegister() {
private val isSecond = XSPUtils.getBoolean("status_bar_time_seconds", false) private val isSecond = XSPUtils.getBoolean("status_bar_time_seconds", false)
private val isDoubleHour = XSPUtils.getBoolean("status_bar_time_double_hour", false) private val isDoubleHour = XSPUtils.getBoolean("status_bar_time_double_hour", false)
private val isPeriod = XSPUtils.getBoolean("status_bar_time_period", true) private val isPeriod = XSPUtils.getBoolean("status_bar_time_period", true)
private val isCenterAlign = XSPUtils.getBoolean("status_bar_time_double_line_center_align", false) private val isCenterAlign =
XSPUtils.getBoolean("status_bar_time_double_line_center_align", false)
//极客模式 //极客模式
private val getGeekClockSize = XSPUtils.getInt("status_bar_clock_size_geek", 0) private val getGeekClockSize = XSPUtils.getInt("status_bar_clock_size_geek", 0)
private val getGeekFormat = XSPUtils.getString("custom_clock_format_geek", "HH:mm:ss") private val getGeekFormat = XSPUtils.getString("custom_clock_format_geek", "HH:mm:ss")
private val isGeekCenterAlign = XSPUtils.getBoolean("status_bar_time_center_align_geek", false) private val isGeekCenterAlign =
XSPUtils.getBoolean("status_bar_time_center_align_geek", false)
private lateinit var nowTime: Date private lateinit var nowTime: Date
private var str = "" private var str = ""
@@ -80,7 +83,9 @@ object StatusBarTimeCustomizationForT : HookRegister() {
} }
} }
Timer().scheduleAtFixedRate( Timer().scheduleAtFixedRate(
T(), 1000 - System.currentTimeMillis() % 1000, 1000 T(),
1000 - System.currentTimeMillis() % 1000,
1000
) )
} catch (_: Exception) { } catch (_: Exception) {
} }
@@ -93,7 +98,8 @@ object StatusBarTimeCustomizationForT : HookRegister() {
val textV = it.thisObject as TextView val textV = it.thisObject as TextView
if (textV.resources.getResourceEntryName(textV.id) == "clock") { if (textV.resources.getResourceEntryName(textV.id) == "clock") {
val t = Settings.System.getString( val t = Settings.System.getString(
c!!.contentResolver, Settings.System.TIME_12_24 c!!.contentResolver,
Settings.System.TIME_12_24
) )
val is24 = t == "24" val is24 = t == "24"
nowTime = Calendar.getInstance().time nowTime = Calendar.getInstance().time
@@ -107,16 +113,10 @@ object StatusBarTimeCustomizationForT : HookRegister() {
findConstructor("com.android.systemui.statusbar.views.MiuiClock") { findConstructor("com.android.systemui.statusbar.views.MiuiClock") {
paramCount == 3 paramCount == 3
}.hookAfter { }.hookAfter {
try {
val textV = it.thisObject as TextView
if (textV.resources.getResourceEntryName(textV.id) == "clock") {
c = it.args[0] as Context c = it.args[0] as Context
val textV = it.thisObject as TextView val textV = it.thisObject as TextView
textV.gravity = Gravity.CENTER textV.gravity = Gravity.CENTER
} }
} catch (_: Exception) {
}
}
} }
} }
//极客模式 //极客模式
@@ -149,7 +149,9 @@ object StatusBarTimeCustomizationForT : HookRegister() {
} }
} }
Timer().scheduleAtFixedRate( Timer().scheduleAtFixedRate(
T(), 1000 - System.currentTimeMillis() % 1000, 1000 T(),
1000 - System.currentTimeMillis() % 1000,
1000
) )
} catch (_: Exception) { } catch (_: Exception) {
} }
@@ -157,20 +159,12 @@ object StatusBarTimeCustomizationForT : HookRegister() {
findMethod("com.android.systemui.statusbar.views.MiuiClock") { findMethod("com.android.systemui.statusbar.views.MiuiClock") {
name == "updateTime" name == "updateTime"
}.hookBefore { }.hookAfter {
try { try {
val textV = it.thisObject as TextView val textV = it.thisObject as TextView
if (textV.resources.getResourceEntryName(textV.id) == "clock") { if (textV.resources.getResourceEntryName(textV.id) == "clock") {
val mMiuiStatusBarClockController = textV.getObject("mMiuiStatusBarClockController") nowTime = Calendar.getInstance().time
val mCalendar = mMiuiStatusBarClockController.invokeMethodAuto("getCalendar") textV.text = SimpleDateFormat(getGeekFormat).format(nowTime)
mCalendar?.invokeMethodAuto(
"setTimeInMillis", System.currentTimeMillis()
)
val textSb = StringBuilder()
val formatSb = StringBuilder(getGeekFormat.toString())
mCalendar?.invokeMethodAuto("format", c, textSb, formatSb)
textV.text = textSb.toString()
it.result = null
} }
} catch (_: Exception) { } catch (_: Exception) {
} }
@@ -180,16 +174,10 @@ object StatusBarTimeCustomizationForT : HookRegister() {
findConstructor("com.android.systemui.statusbar.views.MiuiClock") { findConstructor("com.android.systemui.statusbar.views.MiuiClock") {
paramCount == 3 paramCount == 3
}.hookAfter { }.hookAfter {
try {
val textV = it.thisObject as TextView
if (textV.resources.getResourceEntryName(textV.id) == "clock") {
c = it.args[0] as Context c = it.args[0] as Context
val textV = it.thisObject as TextView val textV = it.thisObject as TextView
textV.gravity = Gravity.CENTER textV.gravity = Gravity.CENTER
} }
} catch (_: Exception) {
}
}
} }
} }
} }
@@ -203,6 +191,7 @@ object StatusBarTimeCustomizationForT : HookRegister() {
if (isYear) { if (isYear) {
if (isZh) { if (isZh) {
datePattern += "YY年" datePattern += "YY年"
// if (!isHideSpace) datePattern = "$datePattern "
} else { } else {
datePattern += "YY" datePattern += "YY"
if (isMonth || isDay) datePattern += "/" if (isMonth || isDay) datePattern += "/"
@@ -211,6 +200,7 @@ object StatusBarTimeCustomizationForT : HookRegister() {
if (isMonth) { if (isMonth) {
if (isZh) { if (isZh) {
datePattern += "M月" datePattern += "M月"
// if (!isHideSpace) datePattern = "$datePattern "
} else { } else {
datePattern += "M" datePattern += "M"
if (isDay) datePattern += "/" if (isDay) datePattern += "/"

View File

@@ -1,439 +0,0 @@
@file:Suppress("unused")
package com.lt2333.simplicitytools.utils
import android.annotation.SuppressLint
import android.content.res.XResources
import com.github.kyuubiran.ezxhelper.init.InitFields.ezXClassLoader
import com.github.kyuubiran.ezxhelper.utils.Log
import dalvik.system.BaseDexClassLoader
import de.robv.android.xposed.XC_MethodHook
import de.robv.android.xposed.XC_MethodHook.MethodHookParam
import de.robv.android.xposed.XC_MethodReplacement
import de.robv.android.xposed.XposedBridge.*
import de.robv.android.xposed.XposedHelpers.*
import de.robv.android.xposed.callbacks.XC_LayoutInflated
import java.lang.reflect.Field
import java.lang.reflect.Member
import java.lang.reflect.Modifier
import java.util.Enumeration
typealias MethodHookParam = MethodHookParam
typealias Replacer = (MethodHookParam) -> Any?
typealias Hooker = (MethodHookParam) -> Unit
fun Class<*>.hookMethod(method: String?, vararg args: Any?) = try {
findAndHookMethod(this, method, *args)
} catch (e: NoSuchMethodError) {
Log.e(e)
null
} catch (e: ClassNotFoundError) {
Log.e(e)
null
} catch (e: ClassNotFoundException) {
Log.e(e)
null
}
fun Member.hookMethod(callback: XC_MethodHook) = try {
hookMethod(this, callback)
} catch (e: Throwable) {
Log.e(e)
null
}
inline fun MethodHookParam.callHooker(crossinline hooker: Hooker) = try {
hooker(this)
} catch (e: Throwable) {
Log.e("Error occurred calling hooker on ${this.method}")
Log.e(e)
}
inline fun MethodHookParam.callReplacer(crossinline replacer: Replacer) = try {
replacer(this)
} catch (e: Throwable) {
Log.e("Error occurred calling replacer on ${this.method}")
Log.e(e)
null
}
inline fun Member.replaceMethod(crossinline replacer: Replacer) = hookMethod(object : XC_MethodReplacement() {
override fun replaceHookedMethod(param: MethodHookParam) = param.callReplacer(replacer)
})
inline fun Member.hookAfterMethod(crossinline hooker: Hooker) = hookMethod(object : XC_MethodHook() {
override fun afterHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Member.hookBeforeMethod(crossinline hooker: (MethodHookParam) -> Unit) = hookMethod(object : XC_MethodHook() {
override fun beforeHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Class<*>.hookBeforeMethod(
method: String?, vararg args: Any?, crossinline hooker: Hooker
) = hookMethod(method, *args, object : XC_MethodHook() {
override fun beforeHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Class<*>.hookAfterMethod(
method: String?, vararg args: Any?, crossinline hooker: Hooker
) = hookMethod(method, *args, object : XC_MethodHook() {
override fun afterHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Class<*>.replaceMethod(
method: String?, vararg args: Any?, crossinline replacer: Replacer
) = hookMethod(method, *args, object : XC_MethodReplacement() {
override fun replaceHookedMethod(param: MethodHookParam) = param.callReplacer(replacer)
})
fun Class<*>.hookAllMethods(methodName: String?, hooker: XC_MethodHook): Set<XC_MethodHook.Unhook> = try {
hookAllMethods(this, methodName, hooker)
} catch (e: NoSuchMethodError) {
Log.e(e)
emptySet()
} catch (e: ClassNotFoundError) {
Log.e(e)
emptySet()
} catch (e: ClassNotFoundException) {
Log.e(e)
emptySet()
}
inline fun Class<*>.hookBeforeAllMethods(methodName: String?, crossinline hooker: Hooker) = hookAllMethods(methodName, object : XC_MethodHook() {
override fun beforeHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Class<*>.hookAfterAllMethods(methodName: String?, crossinline hooker: Hooker) = hookAllMethods(methodName, object : XC_MethodHook() {
override fun afterHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Class<*>.replaceAllMethods(methodName: String?, crossinline replacer: Replacer) =
hookAllMethods(methodName, object : XC_MethodReplacement() {
override fun replaceHookedMethod(param: MethodHookParam) = param.callReplacer(replacer)
})
fun Class<*>.hookConstructor(vararg args: Any?) = try {
findAndHookConstructor(this, *args)
} catch (e: NoSuchMethodError) {
Log.e(e)
null
} catch (e: ClassNotFoundError) {
Log.e(e)
null
} catch (e: ClassNotFoundException) {
Log.e(e)
null
}
inline fun Class<*>.hookBeforeConstructor(vararg args: Any?, crossinline hooker: Hooker) = hookConstructor(*args, object : XC_MethodHook() {
override fun beforeHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Class<*>.hookAfterConstructor(vararg args: Any?, crossinline hooker: Hooker) = hookConstructor(*args, object : XC_MethodHook() {
override fun afterHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Class<*>.replaceConstructor(vararg args: Any?, crossinline hooker: Hooker) = hookConstructor(*args, object : XC_MethodReplacement() {
override fun replaceHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
fun Class<*>.hookAllConstructors(hooker: XC_MethodHook): Set<XC_MethodHook.Unhook> = try {
hookAllConstructors(this, hooker)
} catch (e: NoSuchMethodError) {
Log.e(e)
emptySet()
} catch (e: ClassNotFoundError) {
Log.e(e)
emptySet()
} catch (e: ClassNotFoundException) {
Log.e(e)
emptySet()
}
inline fun Class<*>.hookAfterAllConstructors(crossinline hooker: Hooker) = hookAllConstructors(object : XC_MethodHook() {
override fun afterHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Class<*>.hookBeforeAllConstructors(crossinline hooker: Hooker) = hookAllConstructors(object : XC_MethodHook() {
override fun beforeHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
inline fun Class<*>.replaceAllConstructors(crossinline hooker: Hooker) = hookAllConstructors(object : XC_MethodReplacement() {
override fun replaceHookedMethod(param: MethodHookParam) = param.callHooker(hooker)
})
fun String.hookMethod(
method: String?, vararg args: Any?
) = try {
findClass().hookMethod(method, *args)
} catch (e: ClassNotFoundError) {
Log.e(e)
null
} catch (e: ClassNotFoundException) {
Log.e(e)
null
}
inline fun String.hookBeforeMethod(
method: String?, vararg args: Any?, crossinline hooker: Hooker
) = try {
findClass().hookBeforeMethod(method, *args, hooker = hooker)
} catch (e: ClassNotFoundError) {
Log.e(e)
null
} catch (e: ClassNotFoundException) {
Log.e(e)
null
}
inline fun String.hookAfterMethod(
method: String?, vararg args: Any?, crossinline hooker: Hooker
) = try {
findClass().hookAfterMethod(method, *args, hooker = hooker)
} catch (e: ClassNotFoundError) {
Log.e(e)
null
} catch (e: ClassNotFoundException) {
Log.e(e)
null
}
inline fun String.replaceMethod(
method: String?, vararg args: Any?, crossinline replacer: Replacer
) = try {
findClass().replaceMethod(method, *args, replacer = replacer)
} catch (e: ClassNotFoundError) {
Log.e(e)
null
} catch (e: ClassNotFoundException) {
Log.e(e)
null
}
fun MethodHookParam.invokeOriginalMethod(): Any? = invokeOriginalMethod(method, thisObject, args)
inline fun <T, R> T.runCatchingOrNull(func: T.() -> R?) = try {
func()
} catch (e: Throwable) {
null
}
fun Any.getObjectField(field: String?): Any? = getObjectField(this, field)
fun Any.getObjectFieldOrNull(field: String?): Any? = runCatchingOrNull {
getObjectField(this, field)
}
@Suppress("UNCHECKED_CAST")
fun <T> Any.getObjectFieldAs(field: String?) = getObjectField(this, field) as T
@Suppress("UNCHECKED_CAST")
fun <T> Any.getObjectFieldOrNullAs(field: String?) = runCatchingOrNull {
getObjectField(this, field) as T
}
fun Any.getIntField(field: String?) = getIntField(this, field)
fun Any.getIntFieldOrNull(field: String?) = runCatchingOrNull {
getIntField(this, field)
}
fun Any.getLongField(field: String?) = getLongField(this, field)
fun Any.getLongFieldOrNull(field: String?) = runCatchingOrNull {
getLongField(this, field)
}
fun Any.getBooleanField(field: String?) = getBooleanField(this, field)
fun Any.getBooleanFieldOrNull(field: String?) = runCatchingOrNull {
getBooleanField(this, field)
}
fun Any.callMethod(methodName: String?, vararg args: Any?): Any? = callMethod(this, methodName, *args)
fun Any.callMethodOrNull(methodName: String?, vararg args: Any?): Any? = runCatchingOrNull {
callMethod(this, methodName, *args)
}
fun Class<*>.callStaticMethod(methodName: String?, vararg args: Any?): Any? = callStaticMethod(this, methodName, *args)
fun Class<*>.callStaticMethodOrNull(methodName: String?, vararg args: Any?): Any? = runCatchingOrNull {
callStaticMethod(this, methodName, *args)
}
@Suppress("UNCHECKED_CAST")
fun <T> Class<*>.callStaticMethodAs(methodName: String?, vararg args: Any?) = callStaticMethod(this, methodName, *args) as T
@Suppress("UNCHECKED_CAST")
fun <T> Class<*>.callStaticMethodOrNullAs(methodName: String?, vararg args: Any?) = runCatchingOrNull {
callStaticMethod(this, methodName, *args) as T
}
@Suppress("UNCHECKED_CAST")
fun <T> Class<*>.getStaticObjectFieldAs(field: String?) = getStaticObjectField(this, field) as T
@Suppress("UNCHECKED_CAST")
fun <T> Class<*>.getStaticObjectFieldOrNullAs(field: String?) = runCatchingOrNull {
getStaticObjectField(this, field) as T
}
fun Class<*>.getStaticObjectField(field: String?): Any? = getStaticObjectField(this, field)
fun Class<*>.getStaticObjectFieldOrNull(field: String?): Any? = runCatchingOrNull {
getStaticObjectField(this, field)
}
fun Class<*>.setStaticObjectField(field: String?, obj: Any?) = apply {
setStaticObjectField(this, field, obj)
}
fun Class<*>.setStaticObjectFieldIfExist(field: String?, obj: Any?) = apply {
try {
setStaticObjectField(this, field, obj)
} catch (ignored: Throwable) {
}
}
inline fun <reified T> Class<*>.findFieldByExactType(): Field? = findFirstFieldByExactType(this, T::class.java)
fun Class<*>.findFieldByExactType(type: Class<*>): Field? = findFirstFieldByExactType(this, type)
@Suppress("UNCHECKED_CAST")
fun <T> Any.callMethodAs(methodName: String?, vararg args: Any?) = callMethod(this, methodName, *args) as T
@Suppress("UNCHECKED_CAST")
fun <T> Any.callMethodOrNullAs(methodName: String?, vararg args: Any?) = runCatchingOrNull {
callMethod(this, methodName, *args) as T
}
fun Any.callMethod(methodName: String?, parameterTypes: Array<Class<*>>, vararg args: Any?): Any? =
callMethod(this, methodName, parameterTypes, *args)
fun Any.callMethodOrNull(
methodName: String?, parameterTypes: Array<Class<*>>, vararg args: Any?
): Any? = runCatchingOrNull {
callMethod(this, methodName, parameterTypes, *args)
}
fun Class<*>.callStaticMethod(
methodName: String?, parameterTypes: Array<Class<*>>, vararg args: Any?
): Any? = callStaticMethod(this, methodName, parameterTypes, *args)
fun Class<*>.callStaticMethodOrNull(
methodName: String?, parameterTypes: Array<Class<*>>, vararg args: Any?
): Any? = runCatchingOrNull {
callStaticMethod(this, methodName, parameterTypes, *args)
}
fun String.findClass(): Class<*> = findClass(this, ezXClassLoader)
fun String.findClassOrNull(): Class<*>? = findClassIfExists(this, ezXClassLoader)
fun Class<*>.new(vararg args: Any?): Any = newInstance(this, *args)
fun Class<*>.new(parameterTypes: Array<Class<*>>, vararg args: Any?): Any = newInstance(this, parameterTypes, *args)
fun Class<*>.findField(field: String?): Field = findField(this, field)
fun Class<*>.findFieldOrNull(field: String?): Field? = findFieldIfExists(this, field)
fun <T> T.setIntField(field: String?, value: Int) = apply {
setIntField(this, field, value)
}
fun <T> T.setLongField(field: String?, value: Long) = apply {
setLongField(this, field, value)
}
fun <T> T.setFloatField(field: String?, value: Float) = apply {
setFloatField(this, field, value)
}
fun <T> T.setBooleanField(field: String?, value: Boolean) = apply {
setBooleanField(this, field, value)
}
fun <T> T.setObjectField(field: String?, value: Any?) = apply {
setObjectField(this, field, value)
}
inline fun XResources.hookLayout(
id: Int, crossinline hooker: (XC_LayoutInflated.LayoutInflatedParam) -> Unit
) {
try {
hookLayout(id, object : XC_LayoutInflated() {
override fun handleLayoutInflated(liparam: LayoutInflatedParam) {
try {
hooker(liparam)
} catch (e: Throwable) {
Log.e(e)
}
}
})
} catch (e: Throwable) {
Log.e(e)
}
}
@SuppressLint("DiscouragedApi")
inline fun XResources.hookLayout(
pkg: String, type: String, name: String, crossinline hooker: (XC_LayoutInflated.LayoutInflatedParam) -> Unit
) {
try {
val id = getIdentifier(name, type, pkg)
hookLayout(id, hooker)
} catch (e: Throwable) {
Log.e(e)
}
}
fun Class<*>.findFirstFieldByExactType(type: Class<*>): Field = findFirstFieldByExactType(this, type)
fun Class<*>.findFirstFieldByExactTypeOrNull(type: Class<*>?): Field? = runCatchingOrNull {
findFirstFieldByExactType(this, type)
}
fun Any.getFirstFieldByExactType(type: Class<*>): Any? = javaClass.findFirstFieldByExactType(type).get(this)
@Suppress("UNCHECKED_CAST")
fun <T> Any.getFirstFieldByExactTypeAs(type: Class<*>) = javaClass.findFirstFieldByExactType(type).get(this) as? T
inline fun <reified T : Any> Any.getFirstFieldByExactType() = javaClass.findFirstFieldByExactType(T::class.java).get(this) as? T
fun Any.getFirstFieldByExactTypeOrNull(type: Class<*>?): Any? = runCatchingOrNull {
javaClass.findFirstFieldByExactTypeOrNull(type)?.get(this)
}
@Suppress("UNCHECKED_CAST")
fun <T> Any.getFirstFieldByExactTypeOrNullAs(type: Class<*>?) = getFirstFieldByExactTypeOrNull(type) as? T
inline fun <reified T> Any.getFirstFieldByExactTypeOrNull() = getFirstFieldByExactTypeOrNull(T::class.java) as? T
inline fun ClassLoader.findDexClassLoader(crossinline delegator: (BaseDexClassLoader) -> BaseDexClassLoader = { x -> x }): BaseDexClassLoader? {
var classLoader = this
while (classLoader !is BaseDexClassLoader) {
if (classLoader.parent != null) classLoader = classLoader.parent
else return null
}
return delegator(classLoader)
}
inline fun ClassLoader.allClassesList(crossinline delegator: (BaseDexClassLoader) -> BaseDexClassLoader = { x -> x }): List<String> {
return findDexClassLoader(delegator)?.getObjectField("pathList")?.getObjectFieldAs<Array<Any>>("dexElements")?.flatMap {
it.getObjectField("dexFile")?.callMethodAs<Enumeration<String>>("entries")?.toList().orEmpty()
}.orEmpty()
}
val Member.isStatic: Boolean
inline get() = Modifier.isStatic(modifiers)
val Member.isFinal: Boolean
inline get() = Modifier.isFinal(modifiers)
val Member.isPublic: Boolean
inline get() = Modifier.isPublic(modifiers)
val Member.isNotStatic: Boolean
inline get() = !isStatic
val Class<*>.isAbstract: Boolean
inline get() = !isPrimitive && Modifier.isAbstract(modifiers)

View File

@@ -1,13 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="63dp"
android:height="63dp"
android:autoMirrored="true"
android:viewportWidth="63"
android:viewportHeight="63">
<path
android:fillColor="#BCBDBE"
android:pathData="m17.85,15.85v17.3c0,0.83 0.67,1.5 1.5,1.5h13.3c0.83,0 1.5,-0.67 1.5,-1.5L34.15,15.85c0,-0.83 -0.68,-1.5 -1.5,-1.5h-13.3c-0.82,0 -1.5,0.67 -1.5,1.5ZM29.16,30.25h-6.32c-0.32,0 -0.59,-0.27 -0.59,-0.61v-10.27c0,-0.34 0.26,-0.61 0.59,-0.61h6.32c0.32,0 0.59,0.27 0.59,0.61v10.27c0,0.34 -0.26,0.61 -0.59,0.61Z" />
<path
android:fillColor="#BCBDBE"
android:pathData="m48.5,6.5L14.2,6.5c-2.32,0 -4.2,1.88 -4.2,4.2v41.3c0,2.49 2.01,4.5 4.5,4.5h34c2.49,0 4.5,-2.01 4.5,-4.5L53,11c0,-2.49 -2.01,-4.5 -4.5,-4.5ZM46.65,51.15h-30.3c-0.55,0 -1,-0.45 -1,-1L15.35,12.85c0,-0.55 0.45,-1 1,-1h30.3c0.55,0 1,0.45 1,1v37.3c0,0.55 -0.45,1 -1,1Z" />
</vector>

View File

@@ -1,13 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="63dp"
android:height="63dp"
android:autoMirrored="true"
android:viewportWidth="63"
android:viewportHeight="63">
<path
android:fillColor="#4D4D4D"
android:pathData="m17.85,15.85v17.3c0,0.83 0.67,1.5 1.5,1.5h13.3c0.83,0 1.5,-0.67 1.5,-1.5L34.15,15.85c0,-0.83 -0.68,-1.5 -1.5,-1.5h-13.3c-0.82,0 -1.5,0.67 -1.5,1.5ZM29.16,30.25h-6.32c-0.32,0 -0.59,-0.27 -0.59,-0.61v-10.27c0,-0.34 0.26,-0.61 0.59,-0.61h6.32c0.32,0 0.59,0.27 0.59,0.61v10.27c0,0.34 -0.26,0.61 -0.59,0.61Z" />
<path
android:fillColor="#4D4D4D"
android:pathData="m48.5,6.5L14.2,6.5c-2.32,0 -4.2,1.88 -4.2,4.2v41.3c0,2.49 2.01,4.5 4.5,4.5h34c2.49,0 4.5,-2.01 4.5,-4.5L53,11c0,-2.49 -2.01,-4.5 -4.5,-4.5ZM46.65,51.15h-30.3c-0.55,0 -1,-0.45 -1,-1L15.35,12.85c0,-0.55 0.45,-1 1,-1h30.3c0.55,0 1,0.45 1,1v37.3c0,0.55 -0.45,1 -1,1Z" />
</vector>

View File

@@ -38,6 +38,7 @@
<string name="github_url">Vítejte více vývojářů, aby se podíleli na vývoji</string> <string name="github_url">Vítejte více vývojářů, aby se podíleli na vývoji</string>
<string name="issues">Zpětná vazba/návrh</string> <string name="issues">Zpětná vazba/návrh</string>
<string name="issues_url">Kliknutím zobrazíte problémy GitHub</string> <string name="issues_url">Kliknutím zobrazíte problémy GitHub</string>
<string name="xposeddescription">Nástroj pro přizpůsobení MIUI13(Android 12)</string>
<string name="statusbar">Stavová lišta</string> <string name="statusbar">Stavová lišta</string>
<string name="status_bar_time_seconds">Zobrazit vteřiny</string> <string name="status_bar_time_seconds">Zobrazit vteřiny</string>
<string name="status_bar_network_speed_refresh_speed">Obnovení rychlosti sítě v sekundách</string> <string name="status_bar_network_speed_refresh_speed">Obnovení rychlosti sítě v sekundách</string>
@@ -131,6 +132,7 @@
<string name="layout_compatibility_mode">Režim kompatibility</string> <string name="layout_compatibility_mode">Režim kompatibility</string>
<string name="left_margin">Levý okraj (0: Auto)</string> <string name="left_margin">Levý okraj (0: Auto)</string>
<string name="right_margin">Pravý okraj (0: Auto)</string> <string name="right_margin">Pravý okraj (0: Auto)</string>
<string name="layout_compatibility_mode_summary">Umožnit zobrazení levého a pravého otvoru</string>
<string name="remove_macro_blacklist">Odstranit makro-černou listinu</string> <string name="remove_macro_blacklist">Odstranit makro-černou listinu</string>
<string name="hide_network_speed_splitter">Skrýt rozdělovač rychlosti sítě</string> <string name="hide_network_speed_splitter">Skrýt rozdělovač rychlosti sítě</string>
<string name="remove_ota_validate_summary">- Podpořte pouze použití VAB série, prosím neotevírejte jiné série.\n- Nemusí být potřeba interní testovací kvalifikace, aby bylo možné nainstalovat celý interní testovací balíček.\n- Ti, kdo mají interní testovací oprávnění, nebudou moci přijímat aktualizace interních testů a mohou být použity k blokování aktualizací systému.\n- Po aktualizaci křížových verzí je doporučeno vymazat data.\n- Neoficiální ROM použití není podporováno.</string> <string name="remove_ota_validate_summary">- Podpořte pouze použití VAB série, prosím neotevírejte jiné série.\n- Nemusí být potřeba interní testovací kvalifikace, aby bylo možné nainstalovat celý interní testovací balíček.\n- Ti, kdo mají interní testovací oprávnění, nebudou moci přijímat aktualizace interních testů a mohou být použity k blokování aktualizací systému.\n- Po aktualizaci křížových verzí je doporučeno vymazat data.\n- Neoficiální ROM použití není podporováno.</string>

View File

@@ -39,7 +39,7 @@
<string name="github_url">Más desarrolladores están invitados a participar en el proyecto</string> <string name="github_url">Más desarrolladores están invitados a participar en el proyecto</string>
<string name="issues">Comentarios/Sugerencias</string> <string name="issues">Comentarios/Sugerencias</string>
<string name="issues_url">Clic para ver errores en GitHub</string> <string name="issues_url">Clic para ver errores en GitHub</string>
<string name="xposeddescription">Herramienta de personalización para MIUI13+(Android 12+)</string> <string name="xposeddescription">Herramienta de personalización para MIUI13 (Android 12)</string>
<string name="statusbar">Barra de estado</string> <string name="statusbar">Barra de estado</string>
<string name="status_bar_time_seconds">Mostrar segundos</string> <string name="status_bar_time_seconds">Mostrar segundos</string>
<string name="status_bar_network_speed_refresh_speed">La velocidad de red se actualiza en segundos</string> <string name="status_bar_network_speed_refresh_speed">La velocidad de red se actualiza en segundos</string>
@@ -136,7 +136,7 @@
<string name="layout_compatibility_mode">Modo de compatibilidad</string> <string name="layout_compatibility_mode">Modo de compatibilidad</string>
<string name="left_margin">Margen izquierdo (0: Auto)</string> <string name="left_margin">Margen izquierdo (0: Auto)</string>
<string name="right_margin">Margen derecho (0: Auto)</string> <string name="right_margin">Margen derecho (0: Auto)</string>
<string name="layout_compatibility_mode_summary">Forzar el diseño a pantalla completa (compatible con cualquier forma de pantalla)</string> <string name="layout_compatibility_mode_summary">Hace que los agujeros izquierdo y derecho de la pantalla se puedan mostrar normalmente</string>
<string name="remove_macro_blacklist">Remueve la lista negra de game macro</string> <string name="remove_macro_blacklist">Remueve la lista negra de game macro</string>
<string name="hide_network_speed_splitter">Remover el divisor de la velocidad de red</string> <string name="hide_network_speed_splitter">Remover el divisor de la velocidad de red</string>
<string name="updater">Actualizador</string> <string name="updater">Actualizador</string>
@@ -237,14 +237,4 @@
<string name="pkg_installer_summary">Desactivar la comprobación del conteo de la instalación</string> <string name="pkg_installer_summary">Desactivar la comprobación del conteo de la instalación</string>
<string name="big_mobile_type_only_show_network_card">Tipo de móvil grande solo muestra tarjeta de red</string> <string name="big_mobile_type_only_show_network_card">Tipo de móvil grande solo muestra tarjeta de red</string>
<string name="big_mobile_type_location">Ubicación del tipo de red móvil grande</string> <string name="big_mobile_type_location">Ubicación del tipo de red móvil grande</string>
<string name="miuihome_recentview_remove_card_animation">Modificar la animación de marcado de tarjetas</string>
<string name="miuihome_recentview_remove_card_animation_summary">Modificar el efecto de animación al remover ventana de tareas recientes</string>
<string name="miuihome_recentwiew_wallpaper_darkening">Deshabilitar atenuación de fondo de pantalla</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">Esto deshabilitará el efecto en el que el fondo de pantalla se ilumina gradualmente cuando se abre y se cierra una tarea reciente</string>
<string name="miuihome_scroll_icon_name">Desplazar el nombre de la app</string>
<string name="miuihome_scroll_icon_name_summary">Si el nombre de la aplicación es demasiado largo se mostrará con desplazamiento y sin ningúna línea nueva</string>
<string name="miuihome_shortcut_add_small_window">Añadir ventana al menú de accesos directos</string>
<string name="miuihome_shortcut_add_small_window_summary">Mantener presionando el icono del escritorio para añadir a una ventana de acceso rápido</string>
<string name="miuihome_shortcut_add_small_window_title">Ventana pequeña </string>
<string name="click_to_view_use_cases">Clic para ver casos de uso</string>
</resources> </resources>

View File

@@ -34,6 +34,7 @@
<string name="github_url">Bienvenue à d\'autres développeurs pour participer au développement</string> <string name="github_url">Bienvenue à d\'autres développeurs pour participer au développement</string>
<string name="issues">Feed-back/Proposition</string> <string name="issues">Feed-back/Proposition</string>
<string name="issues_url">Cliquez pour voir GitHub</string> <string name="issues_url">Cliquez pour voir GitHub</string>
<string name="xposeddescription">Outil de personnalisation pour MIUI13(Android 12)</string>
<string name="statusbar">Barre d\'État</string> <string name="statusbar">Barre d\'État</string>
<string name="status_bar_time_seconds">Affichage des secondes</string> <string name="status_bar_time_seconds">Affichage des secondes</string>
<string name="status_bar_network_speed_refresh_speed">Rafraichissement de la vitesse du réseau en secondes</string> <string name="status_bar_network_speed_refresh_speed">Rafraichissement de la vitesse du réseau en secondes</string>
@@ -126,6 +127,7 @@
<string name="layout_compatibility_mode">Mode Compatibilité</string> <string name="layout_compatibility_mode">Mode Compatibilité</string>
<string name="left_margin">Marge gauche (0: Auto)</string> <string name="left_margin">Marge gauche (0: Auto)</string>
<string name="right_margin">Marge droite (0: Auto)</string> <string name="right_margin">Marge droite (0: Auto)</string>
<string name="layout_compatibility_mode_summary">L\'écran de trou peut s\'afficher normalement</string>
<string name="remove_macro_blacklist">Supprimer la liste noire des macros du jeu</string> <string name="remove_macro_blacklist">Supprimer la liste noire des macros du jeu</string>
<string name="hide_network_speed_splitter">Masquer le écart de vitesse du réseau</string> <string name="hide_network_speed_splitter">Masquer le écart de vitesse du réseau</string>
<string name="updater">Mise à jour</string> <string name="updater">Mise à jour</string>

View File

@@ -37,6 +37,7 @@
<string name="github_url">Szeretnénk, hogy több fejlesztő vegyen részt a fejlesztésben</string> <string name="github_url">Szeretnénk, hogy több fejlesztő vegyen részt a fejlesztésben</string>
<string name="issues">Visszajelzés/javaslat</string> <string name="issues">Visszajelzés/javaslat</string>
<string name="issues_url">Kattintson a GitHub problémák megtekintéséhez</string> <string name="issues_url">Kattintson a GitHub problémák megtekintéséhez</string>
<string name="xposeddescription">Testreszabási eszköz a MIUI13(Android 12) számára</string>
<string name="statusbar">Állapotsor</string> <string name="statusbar">Állapotsor</string>
<string name="status_bar_time_seconds">Másodpercek kijelzése</string> <string name="status_bar_time_seconds">Másodpercek kijelzése</string>
<string name="status_bar_network_speed_refresh_speed">Hálózati sebesség frissítése másodpercekben</string> <string name="status_bar_network_speed_refresh_speed">Hálózati sebesség frissítése másodpercekben</string>
@@ -132,6 +133,7 @@
<string name="layout_compatibility_mode">Kompatibilitási mód</string> <string name="layout_compatibility_mode">Kompatibilitási mód</string>
<string name="left_margin">Bal margó (0: Automatikus)</string> <string name="left_margin">Bal margó (0: Automatikus)</string>
<string name="right_margin">Jobb margó (0: Automatikus)</string> <string name="right_margin">Jobb margó (0: Automatikus)</string>
<string name="layout_compatibility_mode_summary">A bal és jobb oldali lyuk képernyő normálisan jeleníthető meg</string>
<string name="remove_macro_blacklist">Játék makró feketelista eltávolítása</string> <string name="remove_macro_blacklist">Játék makró feketelista eltávolítása</string>
<string name="hide_network_speed_splitter">Hálózati sebességosztó elrejtése</string> <string name="hide_network_speed_splitter">Hálózati sebességosztó elrejtése</string>
<string name="updater">Frissítés</string> <string name="updater">Frissítés</string>

View File

@@ -35,6 +35,7 @@
<string name="github_url">Selamat datang lebih banyak developer untuk berpartisipasi dalam pengembangan</string> <string name="github_url">Selamat datang lebih banyak developer untuk berpartisipasi dalam pengembangan</string>
<string name="issues">Umpan Balik/Usulan</string> <string name="issues">Umpan Balik/Usulan</string>
<string name="issues_url">Klik untuk melihat Masalah GitHub</string> <string name="issues_url">Klik untuk melihat Masalah GitHub</string>
<string name="xposeddescription">Alat perubahan untuk MIUI13 (Android 12)</string>
<string name="status_bar_time_seconds">Tampilkan detik</string> <string name="status_bar_time_seconds">Tampilkan detik</string>
<string name="status_bar_network_speed_refresh_speed">Perubahan kecepatan jaringan dalam detik</string> <string name="status_bar_network_speed_refresh_speed">Perubahan kecepatan jaringan dalam detik</string>
<string name="remove_the_maximum_number_of_notification_icons">Hapus jumlah maksimum ikon notifikasi</string> <string name="remove_the_maximum_number_of_notification_icons">Hapus jumlah maksimum ikon notifikasi</string>
@@ -125,6 +126,7 @@
<string name="layout_compatibility_mode">Mode kompatibel</string> <string name="layout_compatibility_mode">Mode kompatibel</string>
<string name="left_margin">Batas kiri (0: Otomatis)</string> <string name="left_margin">Batas kiri (0: Otomatis)</string>
<string name="right_margin">Batas kanan (0: Otomatis)</string> <string name="right_margin">Batas kanan (0: Otomatis)</string>
<string name="layout_compatibility_mode_summary">Buat layar lubang kiri dan kanan dapat ditampilkan secara normal</string>
<string name="remove_macro_blacklist">Hapus pengecualian makro game</string> <string name="remove_macro_blacklist">Hapus pengecualian makro game</string>
<string name="hide_network_speed_splitter">Sembunyikan pembagi kecepatan jaringan</string> <string name="hide_network_speed_splitter">Sembunyikan pembagi kecepatan jaringan</string>
<string name="updater">Pembaruan</string> <string name="updater">Pembaruan</string>

View File

@@ -39,7 +39,7 @@
<string name="github_url">開発に参加できる開発者を歓迎します</string> <string name="github_url">開発に参加できる開発者を歓迎します</string>
<string name="issues">ご意見・ご提案</string> <string name="issues">ご意見・ご提案</string>
<string name="issues_url">クリックして GitHub Issues を表示する</string> <string name="issues_url">クリックして GitHub Issues を表示する</string>
<string name="xposeddescription">MIUI13 (Android 12) 以降向けカスタマイズツール</string> <string name="xposeddescription">MIUI13 (Android 12) カスタマイズツール</string>
<string name="statusbar">ステータスバー</string> <string name="statusbar">ステータスバー</string>
<string name="status_bar_time_seconds">秒を表示する</string> <string name="status_bar_time_seconds">秒を表示する</string>
<string name="status_bar_network_speed_refresh_speed">ネットワーク速度を秒単位で更新</string> <string name="status_bar_network_speed_refresh_speed">ネットワーク速度を秒単位で更新</string>
@@ -136,7 +136,7 @@
<string name="layout_compatibility_mode">互換モード</string> <string name="layout_compatibility_mode">互換モード</string>
<string name="left_margin">左マージン0自動</string> <string name="left_margin">左マージン0自動</string>
<string name="right_margin">右マージン0自動</string> <string name="right_margin">右マージン0自動</string>
<string name="layout_compatibility_mode_summary">全画面レイアウトを強制(すべての特殊な形状の画面に対応)</string> <string name="layout_compatibility_mode_summary">左右の穴の画面を正常に表示できるようにする</string>
<string name="remove_macro_blacklist">ゲームのマクロブラックリストを削除</string> <string name="remove_macro_blacklist">ゲームのマクロブラックリストを削除</string>
<string name="hide_network_speed_splitter">ネットワーク速度分割器を非表示</string> <string name="hide_network_speed_splitter">ネットワーク速度分割器を非表示</string>
<string name="updater">更新</string> <string name="updater">更新</string>
@@ -235,16 +235,4 @@
<string name="make_millet_ignore_active_summary">非常にアグレッシブで、アプリの実行に影響する可能性があります</string> <string name="make_millet_ignore_active_summary">非常にアグレッシブで、アプリの実行に影響する可能性があります</string>
<string name="pkg_installer">パッケージインストーラー</string> <string name="pkg_installer">パッケージインストーラー</string>
<string name="pkg_installer_summary">アプリインストール時のカウントチェックを無効にします</string> <string name="pkg_installer_summary">アプリインストール時のカウントチェックを無効にします</string>
<string name="big_mobile_type_only_show_network_card">ネットワークカードのみを表示する大きなモバイルタイプ</string>
<string name="big_mobile_type_location">大きなモバイルタイプの位置</string>
<string name="miuihome_recentview_remove_card_animation">カードマーキングアニメーションを変更する</string>
<string name="miuihome_recentview_remove_card_animation_summary">アプリ履歴でカードを削除するときのアニメーション効果を変更します</string>
<string name="miuihome_recentwiew_wallpaper_darkening">壁紙の調整を無効にする</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">アプリ履歴へ出入りするときに壁紙の明るさが徐々に変化する効果を無効します</string>
<string name="miuihome_scroll_icon_name">アプリ名をスクロール</string>
<string name="miuihome_scroll_icon_name_summary">アプリ名が長すぎるとき、改行させずスクロール表示させます</string>
<string name="miuihome_shortcut_add_small_window">ショートカットメニューの追加ウィンドウ</string>
<string name="miuihome_shortcut_add_small_window_summary">ホーム画面のアイコンを長押しすると、素早く開けるウィンドウを追加できます</string>
<string name="miuihome_shortcut_add_small_window_title">小さいウィンドウ</string>
<string name="click_to_view_use_cases">クリックして使用例を表示</string>
</resources> </resources>

View File

@@ -38,6 +38,7 @@
<string name="github_url">개발에 참여하는 더 많은 개발자를 환영합니다</string> <string name="github_url">개발에 참여하는 더 많은 개발자를 환영합니다</string>
<string name="issues">피드백 및 제안</string> <string name="issues">피드백 및 제안</string>
<string name="issues_url">클릭해 GitHub 이슈 보기</string> <string name="issues_url">클릭해 GitHub 이슈 보기</string>
<string name="xposeddescription">MIUI 13(Android 12) 용 커스텀 도구</string>
<string name="statusbar">상태 바</string> <string name="statusbar">상태 바</string>
<string name="status_bar_time_seconds">화면 표시 시간</string> <string name="status_bar_time_seconds">화면 표시 시간</string>
<string name="status_bar_network_speed_refresh_speed">몇 초에 네트워크 속도 새로 고침</string> <string name="status_bar_network_speed_refresh_speed">몇 초에 네트워크 속도 새로 고침</string>

View File

@@ -35,6 +35,7 @@
<string name="github_url">Welkom meer ontwikkelaars om deel te nemen in de ontwikkeling</string> <string name="github_url">Welkom meer ontwikkelaars om deel te nemen in de ontwikkeling</string>
<string name="issues">Feedback/Voorstel</string> <string name="issues">Feedback/Voorstel</string>
<string name="issues_url">Klik om GitHub Problemen te bekijken</string> <string name="issues_url">Klik om GitHub Problemen te bekijken</string>
<string name="xposeddescription">Aanpassingsgereedschap voor MIUI13(Android 12)</string>
<string name="statusbar">Statusbalk</string> <string name="statusbar">Statusbalk</string>
<string name="status_bar_time_seconds">Seconden weergeven</string> <string name="status_bar_time_seconds">Seconden weergeven</string>
<string name="status_bar_network_speed_refresh_speed">Netwerksnelheid vernieuwen in seconden</string> <string name="status_bar_network_speed_refresh_speed">Netwerksnelheid vernieuwen in seconden</string>

View File

@@ -39,7 +39,7 @@
<string name="github_url">Zachęcam do rozwijania projektu innych deweloperów</string> <string name="github_url">Zachęcam do rozwijania projektu innych deweloperów</string>
<string name="issues">Opinie/propozycje</string> <string name="issues">Opinie/propozycje</string>
<string name="issues_url">Kliknij, aby wyświetlić zgłoszenia na GitHubie</string> <string name="issues_url">Kliknij, aby wyświetlić zgłoszenia na GitHubie</string>
<string name="xposeddescription">Narzędzie do dostosowywania MIUI 13+ (Android 12+)</string> <string name="xposeddescription">Narzędzie do dostosowywania MIUI 13 (Android 12)</string>
<string name="statusbar">Pasek statusu</string> <string name="statusbar">Pasek statusu</string>
<string name="status_bar_time_seconds">Wyświetlaj sekundy</string> <string name="status_bar_time_seconds">Wyświetlaj sekundy</string>
<string name="status_bar_network_speed_refresh_speed">Odświeżenie prędkości sieci w sekundach</string> <string name="status_bar_network_speed_refresh_speed">Odświeżenie prędkości sieci w sekundach</string>
@@ -136,7 +136,7 @@
<string name="layout_compatibility_mode">Tryb zgodności</string> <string name="layout_compatibility_mode">Tryb zgodności</string>
<string name="left_margin">Lewy margines (0: autom.)</string> <string name="left_margin">Lewy margines (0: autom.)</string>
<string name="right_margin">Prawy margines (0: autom.)</string> <string name="right_margin">Prawy margines (0: autom.)</string>
<string name="layout_compatibility_mode_summary">Wymuś układ pełnoekranowy (obsługuje wszystkie ekrany o specjalnym kształcie)</string> <string name="layout_compatibility_mode_summary">Spraw, aby lewy i prawy otwór na aparat mógł być wyświetlany normalnie</string>
<string name="remove_macro_blacklist">Usuń czarną listę gier, dla których wyłączono obsługę makr</string> <string name="remove_macro_blacklist">Usuń czarną listę gier, dla których wyłączono obsługę makr</string>
<string name="hide_network_speed_splitter">Ukryj rozdzielacz prędkości sieci</string> <string name="hide_network_speed_splitter">Ukryj rozdzielacz prędkości sieci</string>
<string name="updater">Aktualizacje</string> <string name="updater">Aktualizacje</string>
@@ -237,14 +237,4 @@
<string name="pkg_installer_summary">Wyłącz sprawdzanie licznika instalacji aplikacji</string> <string name="pkg_installer_summary">Wyłącz sprawdzanie licznika instalacji aplikacji</string>
<string name="big_mobile_type_only_show_network_card">Duża ikona typu sieci tylko dla aktywnej karty SIM</string> <string name="big_mobile_type_only_show_network_card">Duża ikona typu sieci tylko dla aktywnej karty SIM</string>
<string name="big_mobile_type_location">Pozycja dużej ikony typu sieci</string> <string name="big_mobile_type_location">Pozycja dużej ikony typu sieci</string>
<string name="miuihome_recentview_remove_card_animation">Zmodyfikuj animację oznaczania kart</string>
<string name="miuihome_recentview_remove_card_animation_summary">Zmodyfikuj efekt animacji karty usunięcia ostatniego zadania</string>
<string name="miuihome_recentwiew_wallpaper_darkening">Wyłącz przyciemnianie tapety</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">Spowoduje to wyłączenie efektu polegającego na tym, że tapeta stopniowo rozjaśnia się od przyciemnienia podczas wchodzenia i wychodzenia z ostatnich zadań</string>
<string name="miuihome_scroll_icon_name">Przewiń nazwę aplikacji</string>
<string name="miuihome_scroll_icon_name_summary">Zbyt długa nazwa aplikacji zostanie przewinięta i wyświetlona bez nowego wiersza</string>
<string name="miuihome_shortcut_add_small_window">Dodaj widżet \"Menu skrótów\"</string>
<string name="miuihome_shortcut_add_small_window_summary">Naciśnij i przytrzymaj ikonę na ekranie głównym, aby dodać okno szybkiego otwierania</string>
<string name="miuihome_shortcut_add_small_window_title">Małe okno</string>
<string name="click_to_view_use_cases">Kliknij, aby wyświetlić przypadki użycia</string>
</resources> </resources>

View File

@@ -38,6 +38,7 @@
<string name="github_url">Sunt bineveniți mai mulți dezvoltatori să participe la dezvoltare</string> <string name="github_url">Sunt bineveniți mai mulți dezvoltatori să participe la dezvoltare</string>
<string name="issues">Feedback/Propunere</string> <string name="issues">Feedback/Propunere</string>
<string name="issues_url">Clic pentru a vizualiza problemele pe GitHub</string> <string name="issues_url">Clic pentru a vizualiza problemele pe GitHub</string>
<string name="xposeddescription">Instrument de personalizare pentru MIUI13 (Android 12)</string>
<string name="statusbar">Bară de stare</string> <string name="statusbar">Bară de stare</string>
<string name="status_bar_time_seconds">Afișare secunde</string> <string name="status_bar_time_seconds">Afișare secunde</string>
<string name="status_bar_network_speed_refresh_speed">Reîmprospătare viteză rețea în secunde</string> <string name="status_bar_network_speed_refresh_speed">Reîmprospătare viteză rețea în secunde</string>
@@ -133,6 +134,7 @@
<string name="layout_compatibility_mode">Mod compatibilitate</string> <string name="layout_compatibility_mode">Mod compatibilitate</string>
<string name="left_margin">Marginea din stânga (0: Auto)</string> <string name="left_margin">Marginea din stânga (0: Auto)</string>
<string name="right_margin">Marginea din dreapta (0: auto)</string> <string name="right_margin">Marginea din dreapta (0: auto)</string>
<string name="layout_compatibility_mode_summary">Aliniere pictograme</string>
<string name="remove_macro_blacklist">Elimină lista neagră a macrocomenzilor jocurilor</string> <string name="remove_macro_blacklist">Elimină lista neagră a macrocomenzilor jocurilor</string>
<string name="hide_network_speed_splitter">Ascunde separatorul vitezei rețelei</string> <string name="hide_network_speed_splitter">Ascunde separatorul vitezei rețelei</string>
<string name="updater">Actualizator</string> <string name="updater">Actualizator</string>

View File

@@ -39,6 +39,7 @@
<string name="github_url">Приглашаем больше разработчиков принять участие в разработке</string> <string name="github_url">Приглашаем больше разработчиков принять участие в разработке</string>
<string name="issues">Обратная связь</string> <string name="issues">Обратная связь</string>
<string name="issues_url">Нажмите, чтобы просмотреть обсуждение на GitHub</string> <string name="issues_url">Нажмите, чтобы просмотреть обсуждение на GitHub</string>
<string name="xposeddescription">Инструмент настройки для MIUI13 (Android 12)</string>
<string name="statusbar">Строка состояния</string> <string name="statusbar">Строка состояния</string>
<string name="status_bar_time_seconds">Секунды</string> <string name="status_bar_time_seconds">Секунды</string>
<string name="status_bar_network_speed_refresh_speed">Обновление скорости сети в секундах</string> <string name="status_bar_network_speed_refresh_speed">Обновление скорости сети в секундах</string>
@@ -135,6 +136,7 @@
<string name="layout_compatibility_mode">Режим совместимости</string> <string name="layout_compatibility_mode">Режим совместимости</string>
<string name="left_margin">Отступ слева (0: Авто)</string> <string name="left_margin">Отступ слева (0: Авто)</string>
<string name="right_margin">Отступ справа (0: Автоматически)</string> <string name="right_margin">Отступ справа (0: Автоматически)</string>
<string name="layout_compatibility_mode_summary">Выравнивание иконок</string>
<string name="remove_macro_blacklist">Удалить черный список игровых макросов</string> <string name="remove_macro_blacklist">Удалить черный список игровых макросов</string>
<string name="hide_network_speed_splitter">Скрыть разделитель скорости сети</string> <string name="hide_network_speed_splitter">Скрыть разделитель скорости сети</string>
<string name="updater">OTA</string> <string name="updater">OTA</string>
@@ -239,14 +241,4 @@
<string name="pkg_installer_summary">Отключить проверку количества установок</string> <string name="pkg_installer_summary">Отключить проверку количества установок</string>
<string name="big_mobile_type_only_show_network_card">Большая иконка типа сети только для активной сим</string> <string name="big_mobile_type_only_show_network_card">Большая иконка типа сети только для активной сим</string>
<string name="big_mobile_type_location">Положение большой иконки типа сети</string> <string name="big_mobile_type_location">Положение большой иконки типа сети</string>
<string name="miuihome_recentview_remove_card_animation">Изменение анимации обозначения карты</string>
<string name="miuihome_recentview_remove_card_animation_summary">Изменить эффект анимации последней карты удаления задачи</string>
<string name="miuihome_recentwiew_wallpaper_darkening">Отключить затемнение обоев</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">Отключит эффект видимости обоев от затемнения при запуске и выходе из недавней задачи</string>
<string name="miuihome_scroll_icon_name">Бегущая строка имени приложений</string>
<string name="miuihome_scroll_icon_name_summary">Длинное имя приложения будет прокручено и отображено в одну строку</string>
<string name="miuihome_shortcut_add_small_window">Меню добавления окна</string>
<string name="miuihome_shortcut_add_small_window_summary">Нажмите и удерживайте иконку рабочего стола, чтобы добавить быстрое открытое окно</string>
<string name="miuihome_shortcut_add_small_window_title">Маленькое окно</string>
<string name="click_to_view_use_cases">Нажмите, чтобы просмотреть варианты использования</string>
</resources> </resources>

View File

@@ -39,6 +39,7 @@
<string name="github_url">Geliştirmeye katılmak için daha fazla geliştiriciye hoş geldiniz</string> <string name="github_url">Geliştirmeye katılmak için daha fazla geliştiriciye hoş geldiniz</string>
<string name="issues">Geribildirim/Teklif</string> <string name="issues">Geribildirim/Teklif</string>
<string name="issues_url">GitHub Sorunlarını görüntülemek için tıklayın</string> <string name="issues_url">GitHub Sorunlarını görüntülemek için tıklayın</string>
<string name="xposeddescription">MIUI13 (Android 12) için özelleştirme aracı</string>
<string name="statusbar">Durum çubuğu</string> <string name="statusbar">Durum çubuğu</string>
<string name="status_bar_time_seconds">Saniye göster</string> <string name="status_bar_time_seconds">Saniye göster</string>
<string name="status_bar_network_speed_refresh_speed">Saniyeler içinde ağ hızı yenileme</string> <string name="status_bar_network_speed_refresh_speed">Saniyeler içinde ağ hızı yenileme</string>
@@ -135,6 +136,7 @@
<string name="layout_compatibility_mode">Uyumluluk modu</string> <string name="layout_compatibility_mode">Uyumluluk modu</string>
<string name="left_margin">Sol kenar boşluğu (0: Otomatik)</string> <string name="left_margin">Sol kenar boşluğu (0: Otomatik)</string>
<string name="right_margin">Sağ kenar boşluğu (0: Otomatik)</string> <string name="right_margin">Sağ kenar boşluğu (0: Otomatik)</string>
<string name="layout_compatibility_mode_summary">Sol ve sağ delik ekranının normal olarak görüntülenebilmesini sağlayın</string>
<string name="remove_macro_blacklist">Oyun makrosu kara listesini kaldır</string> <string name="remove_macro_blacklist">Oyun makrosu kara listesini kaldır</string>
<string name="hide_network_speed_splitter">Ağ hızı ayırıcısını gizle</string> <string name="hide_network_speed_splitter">Ağ hızı ayırıcısını gizle</string>
<string name="updater">Güncelleyici</string> <string name="updater">Güncelleyici</string>

View File

@@ -39,7 +39,7 @@
<string name="github_url">Chào mừng các nhà phát triển tham gia vào quá trình phát triển</string> <string name="github_url">Chào mừng các nhà phát triển tham gia vào quá trình phát triển</string>
<string name="issues">Phản hồi/Đề xuất</string> <string name="issues">Phản hồi/Đề xuất</string>
<string name="issues_url">Ấn để xem GitHub Issues</string> <string name="issues_url">Ấn để xem GitHub Issues</string>
<string name="xposeddescription">Công cụ tuỳ chỉnh cho MIUI13+(Android 12+)</string> <string name="xposeddescription">Công cụ tuỳ chỉnh hoá MIUI13(Android 12)</string>
<string name="statusbar">Thanh trạng thái</string> <string name="statusbar">Thanh trạng thái</string>
<string name="status_bar_time_seconds">Hiển thị giây</string> <string name="status_bar_time_seconds">Hiển thị giây</string>
<string name="status_bar_network_speed_refresh_speed">Làm mới tốc độ mạng trong vài giây</string> <string name="status_bar_network_speed_refresh_speed">Làm mới tốc độ mạng trong vài giây</string>
@@ -136,7 +136,7 @@
<string name="layout_compatibility_mode">Chế độ tương thích</string> <string name="layout_compatibility_mode">Chế độ tương thích</string>
<string name="left_margin">Lề trái (0: Tự động)</string> <string name="left_margin">Lề trái (0: Tự động)</string>
<string name="right_margin">Lề phải (0: Tự động)</string> <string name="right_margin">Lề phải (0: Tự động)</string>
<string name="layout_compatibility_mode_summary">Bắt buộc bố cục toàn màn hình (hỗ trợ tất cả các màn hình có hình dạng đặc biệt)</string> <string name="layout_compatibility_mode_summary">Làm cho màn hình đục lỗ bên trái và bên phải có thể hiển thị bình thường</string>
<string name="remove_macro_blacklist">Xóa danh sách đen macro trò chơi</string> <string name="remove_macro_blacklist">Xóa danh sách đen macro trò chơi</string>
<string name="hide_network_speed_splitter">Ẩn bộ chia tốc độ mạng</string> <string name="hide_network_speed_splitter">Ẩn bộ chia tốc độ mạng</string>
<string name="updater">Trình cập nhật</string> <string name="updater">Trình cập nhật</string>
@@ -237,14 +237,4 @@
<string name="pkg_installer_summary">Tắt kiểm tra số lần cài đặt ứng dụng</string> <string name="pkg_installer_summary">Tắt kiểm tra số lần cài đặt ứng dụng</string>
<string name="big_mobile_type_only_show_network_card">Mạng dữ liệu lớn chỉ hiển thị thẻ mạng</string> <string name="big_mobile_type_only_show_network_card">Mạng dữ liệu lớn chỉ hiển thị thẻ mạng</string>
<string name="big_mobile_type_location">Vị trí mạng dữ liệu lớn</string> <string name="big_mobile_type_location">Vị trí mạng dữ liệu lớn</string>
<string name="miuihome_recentview_remove_card_animation">Sửa đổi hoạt ảnh đánh dấu thẻ</string>
<string name="miuihome_recentview_remove_card_animation_summary">Sửa đổi hiệu ứng hoạt ảnh của thẻ loại bỏ nhiệm vụ gần đây</string>
<string name="miuihome_recentwiew_wallpaper_darkening">Tắt làm mờ hình nền</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">Điều này sẽ vô hiệu hóa hiệu ứng mà hình nền sẽ sáng lên rồi mờ khi vào và ra khỏi tác vụ gần đây</string>
<string name="miuihome_scroll_icon_name">Cuộn tên ứng dụng</string>
<string name="miuihome_scroll_icon_name_summary">Tên ứng dụng quá dài sẽ bị cuộn và hiển thị mà không có dòng mới nào</string>
<string name="miuihome_shortcut_add_small_window">Menu phím tắt thêm cửa sổ</string>
<string name="miuihome_shortcut_add_small_window_summary">Nhấn và giữ biểu tượng màn hình chính để thêm cửa sổ mở nhanh</string>
<string name="miuihome_shortcut_add_small_window_title">Cửa sổ nhỏ</string>
<string name="click_to_view_use_cases">Nhấp để xem các trường hợp sử dụng</string>
</resources> </resources>

View File

@@ -39,7 +39,7 @@
<string name="github_url">欢迎更多开发者共同参与开发</string> <string name="github_url">欢迎更多开发者共同参与开发</string>
<string name="issues">反馈/提议</string> <string name="issues">反馈/提议</string>
<string name="issues_url">点击查看GitHub Issues</string> <string name="issues_url">点击查看GitHub Issues</string>
<string name="xposeddescription">基于 MIUI13+(Android 12+) 适配的自定义工具</string> <string name="xposeddescription">基于 MIUI13(Android 12) 适配的自定义工具</string>
<string name="statusbar">状态栏</string> <string name="statusbar">状态栏</string>
<string name="status_bar_time_seconds">显示秒数</string> <string name="status_bar_time_seconds">显示秒数</string>
<string name="status_bar_network_speed_refresh_speed">网速秒刷新</string> <string name="status_bar_network_speed_refresh_speed">网速秒刷新</string>
@@ -136,7 +136,7 @@
<string name="layout_compatibility_mode">兼容模式</string> <string name="layout_compatibility_mode">兼容模式</string>
<string name="left_margin">左边距 (0: 自动)</string> <string name="left_margin">左边距 (0: 自动)</string>
<string name="right_margin">右边距 (0: 自动)</string> <string name="right_margin">右边距 (0: 自动)</string>
<string name="layout_compatibility_mode_summary">强制完整屏布局(支持所有异形屏)</string> <string name="layout_compatibility_mode_summary">使左右挖孔屏幕能正常显示</string>
<string name="remove_macro_blacklist">去除游戏自动连招黑名单</string> <string name="remove_macro_blacklist">去除游戏自动连招黑名单</string>
<string name="hide_network_speed_splitter">隐藏网速分隔符</string> <string name="hide_network_speed_splitter">隐藏网速分隔符</string>
<string name="updater">系统更新</string> <string name="updater">系统更新</string>
@@ -235,17 +235,4 @@
<string name="make_millet_ignore_active_summary">非常激进,可能会影响应用运行</string> <string name="make_millet_ignore_active_summary">非常激进,可能会影响应用运行</string>
<string name="pkg_installer">应用包管理组件</string> <string name="pkg_installer">应用包管理组件</string>
<string name="pkg_installer_summary">禁用频繁安装应用检查</string> <string name="pkg_installer_summary">禁用频繁安装应用检查</string>
<string name="big_mobile_type_only_show_network_card">大移动类型图标只显示上网卡</string>
<string name="big_mobile_type_location">大移动类型图标位置</string>
<string name="miuihome_recentview_remove_card_animation">修改划卡动画</string>
<string name="miuihome_recentview_remove_card_animation_summary">修改最近任务移除卡片的动画效果</string>
<string name="miuihome_recentwiew_wallpaper_darkening">禁用壁纸压暗效果</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">这将禁用进出最近任务时壁纸从压暗逐渐变亮的效果</string>
<string name="miuihome_scroll_icon_name">滚动显示应用名称</string>
<string name="miuihome_scroll_icon_name_summary">过长的应用名称将滚动进行显示,不再进行换行</string>
<string name="miuihome_shortcut_add_small_window">快捷菜单添加小窗</string>
<string name="miuihome_shortcut_add_small_window_summary">桌面图标长按快捷菜单位置添加快速打开小窗</string>
<string name="miuihome_shortcut_add_small_window_title">小窗</string>
<string name="click_to_view_use_cases">点击查看用例</string>
<string name="disable_bluetooth_temporarily_off" comment="This function is used to completely close Bluetooth">禁用临时关闭蓝牙</string>
</resources> </resources>

View File

@@ -39,6 +39,7 @@
<string name="github_url">歡迎更多開發者共同參與開發</string> <string name="github_url">歡迎更多開發者共同參與開發</string>
<string name="issues">反饋/提議</string> <string name="issues">反饋/提議</string>
<string name="issues_url">點擊查看GitHub Issues</string> <string name="issues_url">點擊查看GitHub Issues</string>
<string name="xposeddescription">基於 MIUI13(Android 12) 適配的自定義工具</string>
<string name="statusbar">狀態欄</string> <string name="statusbar">狀態欄</string>
<string name="status_bar_time_seconds">顯示秒數</string> <string name="status_bar_time_seconds">顯示秒數</string>
<string name="status_bar_network_speed_refresh_speed">網速秒刷新</string> <string name="status_bar_network_speed_refresh_speed">網速秒刷新</string>
@@ -135,6 +136,7 @@
<string name="layout_compatibility_mode">兼容模式</string> <string name="layout_compatibility_mode">兼容模式</string>
<string name="left_margin">左邊距 (0: 自動)</string> <string name="left_margin">左邊距 (0: 自動)</string>
<string name="right_margin">右邊距 (0: 自動)</string> <string name="right_margin">右邊距 (0: 自動)</string>
<string name="layout_compatibility_mode_summary">使左右挖孔螢幕能正常顯示</string>
<string name="remove_macro_blacklist">去除遊戲自動連招黑名單</string> <string name="remove_macro_blacklist">去除遊戲自動連招黑名單</string>
<string name="hide_network_speed_splitter">隱藏網速分隔符</string> <string name="hide_network_speed_splitter">隱藏網速分隔符</string>
<string name="updater">系統更新</string> <string name="updater">系統更新</string>

View File

@@ -1,250 +1,229 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="performance">性能</string> <string name="performance">性能</string>
<string name="lock_max_fps">鎖定目前重新整理速率上限</string> <string name="lock_max_fps">鎖定螢幕更新率上限</string>
<string name="ui">介面</string> <string name="ui">介面</string>
<string name="delete_on_post_notification">移除上層顯示通知</string> <string name="delete_on_post_notification">移除上層顯示通知</string>
<string name="delete_on_post_notification_summary">移除此應用程式正顯示在螢幕上其他應用程式的上層通知</string> <string name="delete_on_post_notification_summary">移除 \"此應用正顯示在螢幕上其他應用的上層\" 通知</string>
<string name="other">其他</string> <string name="other">其他</string>
<string name="disable_flag_secure">允許螢幕截圖</string> <string name="disable_flag_secure">允許截圖</string>
<string name="disable_flag_secure_summary">開啟後允許在不允許截圖的軟體中截圖\n支援新增下拉控制中心快速開關,保障安全</string> <string name="disable_flag_secure_summary">開啟後允許在不允許截圖的軟體中截圖\n支援添加下拉控制中心快速開關,保障安全</string>
<string name="home">桌面</string> <string name="home">桌面</string>
<string name="home_time">始終顯示桌面時鐘</string> <string name="home_time">始終顯示桌面時鐘</string>
<string name="reboot_host">重啟所有作用範圍</string> <string name="reboot_host">重啟全部作用域</string>
<string name="reboot">重啟系統</string> <string name="reboot">重啟系統</string>
<!--Status bar icons--> <!--Status bar icons-->
<string name="status_bar_icon">狀態圖示</string> <string name="status_bar_icon">狀態圖示</string>
<string name="hide_no_sim_icon">隱藏「無 SIM 卡」圖示</string> <string name="hide_no_sim_icon">隱藏 無SIM卡 圖示</string>
<string name="hide_sim_one_icon">隱藏SIM 卡 1」圖示</string> <string name="hide_sim_one_icon">隱藏 SIM卡一 圖示</string>
<string name="hide_sim_two_icon">隱藏SIM 卡 2」圖示</string> <string name="hide_sim_two_icon">隱藏 SIM卡二 圖示</string>
<string name="hide_vpn_icon">隱藏VPN圖示</string> <string name="hide_vpn_icon">隱藏 VPN 圖示</string>
<string name="hide_airplane_icon">隱藏「飛航模式圖示</string> <string name="hide_airplane_icon">隱藏 飛行模式 圖示</string>
<string name="hide_wifi_icon">隱藏WIFI圖示</string> <string name="hide_wifi_icon">隱藏 WIFI 圖示</string>
<string name="hide_bluetooth_icon">隱藏藍牙圖示</string> <string name="hide_bluetooth_icon">隱藏 藍牙 圖示</string>
<string name="hide_volume_zen_icon">隱藏聲音、勿擾圖示</string> <string name="hide_volume_zen_icon">隱藏 聲音、勿擾 圖示</string>
<string name="hide_alarm_icon">隱藏鬧鐘圖示</string> <string name="hide_alarm_icon">隱藏 鬧鐘 圖示</string>
<string name="hide_hotspot_icon">隱藏WIFI 熱點圖示</string> <string name="hide_hotspot_icon">隱藏 WIFI熱點 圖示</string>
<string name="hide_headset_icon">隱藏耳機圖示</string> <string name="hide_headset_icon">隱藏 耳機 圖示</string>
<string name="hide_bluetooth_battery_icon">隱藏藍牙電量圖示</string> <string name="hide_bluetooth_battery_icon">隱藏 藍牙電量 圖示</string>
<string name="hide_nfc_icon">隱藏NFC圖示</string> <string name="hide_nfc_icon">隱藏 NFC 圖示</string>
<string name="hide_big_hd_icon">隱藏「大型 HD圖示</string> <string name="hide_big_hd_icon">隱藏 HD 圖示</string>
<string name="hide_small_hd_icon">隱藏「小型 HD圖示</string> <string name="hide_small_hd_icon">隱藏 HD 圖示</string>
<string name="hide_new_hd_icon">隱藏「新 HD圖示</string> <string name="hide_hd_no_service_icon">隱藏 HD無服務 圖示</string>
<string name="hide_hd_no_service_icon">隱藏「HD 無服務」圖示</string>
<string name="about">關於</string> <string name="about">關於</string>
<string name="about_module">關於模組</string> <string name="about_module">關於模組</string>
<string name="verison">版本</string> <string name="verison">版本</string>
<string name="dev_coolapk">開發人員酷安</string> <string name="dev_coolapk">開發酷安</string>
<string name="opensource">放原始碼存放</string> <string name="opensource">源倉</string>
<string name="github_url">歡迎更多開發人員共同參與開發</string> <string name="github_url">歡迎更多開發共同參與開發</string>
<string name="issues">回饋/提議</string> <string name="issues">回饋/提議</string>
<string name="issues_url">按一下以檢視 GitHub 問題</string> <string name="issues_url">點擊查看GitHub Issues</string>
<string name="xposeddescription">基於 MIUI13+(Android 12+) 的客製化工具</string> <string name="xposeddescription">基於 MIUI13(Android 12) 適配的自訂工具</string>
<string name="statusbar">狀態</string> <string name="statusbar">狀態</string>
<string name="status_bar_time_seconds">顯示秒數</string> <string name="status_bar_time_seconds">顯示秒數</string>
<string name="status_bar_network_speed_refresh_speed">每秒更新即時網路速度</string> <string name="status_bar_network_speed_refresh_speed">每秒更新即時網</string>
<string name="remove_the_maximum_number_of_notification_icons">除通知圖示數量上限</string> <string name="remove_the_maximum_number_of_notification_icons">除通知圖示數量上限</string>
<string name="main_switch">模組開關</string> <string name="main_switch">模組開關</string>
<string name="hide_gps_icon">隱藏GPS圖示</string> <string name="hide_gps_icon">隱藏 GPS 圖示</string>
<string name="hide_status_bar_network_speed_second">隱藏網路速度 (/s) 單位</string> <string name="hide_status_bar_network_speed_second">隱藏網速(/s單位</string>
<string name="menu">選單</string> <string name="menu">選單</string>
<string name="Tips">提示</string> <string name="Tips">提示</string>
<string name="skip_waiting_time">跳過 5/10 秒警告時間</string> <string name="skip_waiting_time">跳過 5/10 秒警告時間</string>
<string name="unlock_unlimited_cropping">移除裁剪圖片/螢幕截圖的限制</string> <string name="unlock_unlimited_cropping">移除裁剪圖片/螢幕截圖的限制</string>
<string name="hide_slave_wifi_icon">隱藏WIFI 次要」圖示</string> <string name="hide_slave_wifi_icon">隱藏 WIFI輔助 圖示</string>
<string name="HideLauncherIcon">隱藏桌面圖示</string> <string name="HideLauncherIcon">隱藏桌面圖示</string>
<string name="hide_battery_percentage_icon">隱藏電量 (%)</string> <string name="hide_battery_percentage_icon">隱藏電量%</string>
<string name="hide_battery_icon">隱藏電池圖示</string> <string name="hide_battery_icon">隱藏 電池 圖示</string>
<string name="status_bar_clock_format">狀態時鐘格式</string> <string name="status_bar_clock_format">狀態時鐘格式</string>
<string name="status_bar_time_year">顯示年份</string> <string name="status_bar_time_year">顯示年份</string>
<string name="status_bar_time_month">顯示月份</string> <string name="status_bar_time_month">顯示月份</string>
<string name="status_bar_time_day">顯示日期</string> <string name="status_bar_time_day">顯示日期</string>
<string name="status_bar_time_week">顯示星期</string> <string name="status_bar_time_week">顯示星期</string>
<string name="status_bar_time_hide_space">隱藏間隔</string> <string name="status_bar_time_hide_space">隱藏間隔</string>
<string name="allow_screenshots">允許截圖</string> <string name="allow_screenshots">允許截圖</string>
<string name="lock_max">鎖定前上限</string> <string name="lock_max">鎖定前上限</string>
<string name="status_bar_time_double_hour">顯示時辰</string> <string name="status_bar_time_double_hour">顯示時辰</string>
<string name="custom_clock_switch">自訂時鐘 - 主開關</string> <string name="custom_clock_switch">自訂時鐘-總開關</string>
<string name="status_bar_time_period">顯示時段</string> <string name="status_bar_time_period">顯示時段</string>
<string name="status_bar_time_double_line">顯示</string> <string name="status_bar_time_double_line">顯示</string>
<string name="status_bar_clock_size">時鐘大小 (0無變更)</string> <string name="status_bar_clock_size">時鐘大小0不更改</string>
<string name="status_bar_clock_double_line_size">大小 (0無變更)</string> <string name="status_bar_clock_double_line_size">大小0不更改</string>
<string name="matters_needing_attention">功能無法生效?</string> <string name="matters_needing_attention">功能無法生效?</string>
<string name="Done">確定</string> <string name="Done">確定</string>
<string name="about_module_summary">檢視模組相關</string> <string name="about_module_summary">查看模組相關訊</string>
<string name="contributor_list">放原始碼存放庫貢獻者名單</string> <string name="contributor_list">源倉庫貢獻者名單</string>
<string name="developer">開發人員</string> <string name="developer">開發</string>
<string name="thank_list">感謝名單</string> <string name="thank_list">感謝名單</string>
<string name="third_party_open_source_statement">第三方開放原始碼聲明</string> <string name="third_party_open_source_statement">第三方開聲明</string>
<string name="corepacth">除安裝限制</string> <string name="corepacth">除安裝限制</string>
<string name="corepacth_summary">降級/不同簽/無簽安裝</string> <string name="corepacth_summary">降級/不同簽/無簽安裝</string>
<string name="prevent_recovery_of_battery_optimization_white_list">防止復原電池效能最佳化白名單</string> <string name="prevent_recovery_of_battery_optimization_white_list">防止恢復電池最佳化白名單</string>
<string name="failed_after_restart">系統重啟後仍會還原</string> <string name="failed_after_restart">系統重啟後仍會還原</string>
<string name="battery_optimization">電池效能最佳化</string> <string name="battery_optimization">電池最佳化</string>
<string name="battery_optimization_summary">快速開啟被 MIUI 隱藏的電池效能最佳化功能</string> <string name="battery_optimization_summary">快速打開被MIUI隱藏的電池最佳化功能</string>
<string name="remove_small_window_restrictions">強制使用小窗</string> <string name="remove_small_window_restrictions">強制使用小窗</string>
<string name="app_coolapk_url">來酷安給我們五星好評</string> <string name="app_coolapk_url">來酷安給我們五星好評</string>
<string name="app_coolapk_url_summary">這可以使我們被更多的人發現</string> <string name="app_coolapk_url_summary">這可以使我們被更多的人發現</string>
<string name="qq_channel">加入 官方QQ頻道</string> <string name="qq_channel">加入 官方QQ頻道</string>
<string name="tg_channel">加入 官方TG頻道</string> <string name="tg_channel">加入 官方TG頻道</string>
<string name="tg_channel_summary">可在頻道頁面進入聊天群組</string> <string name="tg_channel_summary">可在頻道資料頁進入交流群</string>
<string name="discussions">討論</string> <string name="discussions">討論</string>
<string name="remove_small_window_restrictions_summary">忽略系統黑名單與軟體小窗封鎖</string> <string name="remove_small_window_restrictions_summary">忽略系統黑名單與軟體禁止小窗</string>
<string name="remove_the_left_side_of_the_lock_screen">移除負一屏功能鎖定</string> <string name="remove_the_left_side_of_the_lock_screen">移除鎖定螢幕負一屏功能</string>
<string name="remove_lock_screen_camera">移除鎖定螢幕相機功能</string> <string name="remove_lock_screen_camera">移除鎖定螢幕相機功能</string>
<string name="only_official_default_themes_are_supported">僅支援官方預設主題</string> <string name="only_official_default_themes_are_supported">僅支援官方預設主題</string>
<string name="lock_one_hundred">手機管家鎖定100分</string> <string name="lock_one_hundred">手機管家鎖定100分</string>
<string name="scope">作用範圍</string> <string name="scope">作用</string>
<string name="scope_android">系統架</string> <string name="scope_android">系統</string>
<string name="scope_systemui">系統 UI</string> <string name="scope_systemui">系統介面</string>
<string name="scope_miuihome">系統桌面</string> <string name="scope_miuihome">系統桌面</string>
<string name="scope_other">其他</string> <string name="scope_other">其他</string>
<string name="status_bar_network_speed_refresh_speed_summary">將狀態列網路速度元件的更新間隔變更為 1s</string> <string name="status_bar_network_speed_refresh_speed_summary">將狀態欄網速組件的更新頻率改成1s</string>
<string name="hide_battery_percentage_icon_summary">需自行開啟電池百分比外顯功能</string> <string name="hide_battery_percentage_icon_summary">需自行開啟電池百分比外顯功能</string>
<string name="hide_status_bar_network_speed_second_summary">隱藏狀態列網路速度元件的 (/s) 單位</string> <string name="hide_status_bar_network_speed_second_summary">隱藏狀態欄網速組件的(/s單位</string>
<string name="remove_the_maximum_number_of_notification_icons_summary">除狀態最多能顯示三條通知的限制</string> <string name="remove_the_maximum_number_of_notification_icons_summary">除狀態最多能顯示3個通知的限制</string>
<string name="scope_systemui_summary">自訂系統介面、狀態、鎖定螢幕等</string> <string name="scope_systemui_summary">自訂系統介面、狀態、鎖定螢幕等</string>
<string name="scope_android_summary">首次啟動模組 或 模組更新後,\n此處的功能需重啟系統後才能生效</string> <string name="scope_android_summary">首次啟動模組 或 模組更新後,\n此處的功能需重啟系統後才能生效</string>
<string name="scope_other_summary">手機管家、相簿編輯、電量與性能等</string> <string name="scope_other_summary">手機管家、相簿編輯、電量與性能等</string>
<string name="scope_powerkeeper">電量與性能</string> <string name="scope_powerkeeper">電量與性能</string>
<string name="scope_securitycenter">手機管家</string> <string name="scope_securitycenter">手機管家</string>
<string name="scope_mediaeditor">相簿編輯</string> <string name="scope_mediaeditor">相簿編輯</string>
<string name="home_time_summary">開啟後即使存在時鐘小工具\n也不會隱藏狀態列時鐘</string> <string name="home_time_summary">開啟後即使存在時鐘小組件\n也不會對狀態欄隱藏時鐘</string>
<string name="skip_waiting_time_summary">開啟後可忽略 MIUI 在開啟 USB 偵錯、\n未知應用程式來源、無障礙時的凍結時間</string> <string name="skip_waiting_time_summary">開啟後可忽略MIUI在開啟USB偵錯、\n未知應用來源、無障礙時的凍結時間</string>
<string name="lock_one_hundred_summary">鎖定手機管家 100 分並封鎖修復按鈕</string> <string name="lock_one_hundred_summary">鎖定手機管家100分並隱藏修復按鈕</string>
<string name="unlock_unlimited_cropping_summary">忽略 MIUI 對圖片裁切的最小限制</string> <string name="unlock_unlimited_cropping_summary">無視MIUI對圖片裁切的最小限制</string>
<string name="hide_wifi_activity_icon">隱藏WIFI 活動」圖示</string> <string name="hide_wifi_activity_icon">隱藏 WIFI箭頭 圖示</string>
<string name="hide_mobile_activity_icon">隱藏「行動網路活動」圖示</string> <string name="hide_mobile_activity_icon">隱藏動網路箭頭 圖示</string>
<string name="hide_mobile_type_icon">隱藏行動網路類型圖示</string> <string name="hide_mobile_type_icon">隱藏 行動網路類型 圖示</string>
<string name="show_weather_main_switch">顯示天氣 - 主開關</string> <string name="show_weather_main_switch">顯示天氣-總開關</string>
<string name="lock_screen">鎖定螢幕</string> <string name="lock_screen">鎖定螢幕</string>
<string name="notification_center">通知中心</string> <string name="notification_center">通知中心</string>
<string name="show_city">顯示城市</string> <string name="show_city">顯示城市</string>
<string name="lock_max_fps_summary">支援新增下拉控制中心快速開關,即時切換</string> <string name="lock_max_fps_summary">支援添加下拉控制中心快速開關,即時切換</string>
<string name="control_center">控制中心</string> <string name="control_center">控制中心</string>
<string name="control_center_weather_summary">暫不支援妙享版控制中心</string> <string name="control_center_weather_summary">暫不支援妙享版控制中心</string>
<string name="not_support">您似乎正在使用過時的 LSPosed 版本或 LSPosed 未啟,請更新 LSPosed 或啟用後再試一次</string> <string name="not_support">您似乎正在使用過時的 LSPosed 版本或 LSPosed 未啟,請更新 LSPosed 或者啟動後再試。</string>
<string name="matters_needing_attention_context">首次啟動或更新後建議重啟手機\n絕大部分功能更後需要在右上角重啟範圍後生效</string> <string name="matters_needing_attention_context">首次啟動或更新後建議重啟手機\n絕大部分功能更後需要在右上角重啟作用域後生效</string>
<string name="are_you_sure_reboot">確定重啟系統?</string> <string name="are_you_sure_reboot">確定重啟系統?</string>
<string name="cancel">取消</string> <string name="cancel">取消</string>
<string name="are_you_sure_reboot_scope">確定重啟所有作用範圍</string> <string name="are_you_sure_reboot_scope">確定重啟全部作用域</string>
<string name="hide_battery_charging_icon">隱藏充電圖示</string> <string name="hide_battery_charging_icon">隱藏 充電 圖示</string>
<string name="hide_wifi_standard_icon">隱藏WIFI 標準圖示</string> <string name="hide_wifi_standard_icon">隱藏 WIFI標準 圖示</string>
<string name="status_bar_time_center">時間</string> <string name="status_bar_time_center">時間</string>
<string name="status_bar_layout_summary">更多狀態列版面配置等候開發中</string> <string name="status_bar_layout_summary">更多狀態欄布局等待開發中</string>
<string name="status_bar_layout">狀態列版面配置</string> <string name="status_bar_layout">狀態欄布局</string>
<string name="layout_compatibility_mode">相容模式</string> <string name="layout_compatibility_mode">相容模式</string>
<string name="left_margin">左邊距 (0自動)</string> <string name="left_margin">左邊距 (0: 自動)</string>
<string name="right_margin">右邊距 (0自動)</string> <string name="right_margin">右邊距 (0: 自動)</string>
<string name="layout_compatibility_mode_summary">強制全螢幕版面配置 (支援所有螢幕凹口或空缺)</string> <string name="layout_compatibility_mode_summary">使左右挖孔螢幕能正常顯示</string>
<string name="remove_macro_blacklist">除遊戲自動連招黑名單</string> <string name="remove_macro_blacklist">除遊戲自動連招黑名單</string>
<string name="hide_network_speed_splitter">隱藏網路速度分割器</string> <string name="hide_network_speed_splitter">隱藏網速分隔符</string>
<string name="updater">系統更新</string> <string name="updater">系統更新</string>
<string name="remove_ota_validate">*移除OTA驗證 [實驗性]</string> <string name="remove_ota_validate">*移除OTA驗證 [實驗性]</string>
<string name="remove_ota_validate_summary">- 僅支援 VAB 系列使用,其餘系列請不要開啟。\n- 無需內測資格即可刷入完整內測包。\n- 擁有內測權限的使用者將無法接收內測更新\n可用於隱藏系統更新。\n- 跨版本類型升級後,建議清除資料。\n- 不支援非官方 ROM 使用。</string> <string name="remove_ota_validate_summary">- 僅支援VAB系列使用其餘系列請不要開啟。\n- 無需內測資格即可刷入完整內測包。\n- 擁有內測權限的使用者將無法接收內測更新\n可用於隱藏系統更新。\n- 跨版本類型升級後,建議清空數據。\n- 不支援非官方ROM使用。</string>
<string name="settings">設定</string> <string name="settings">設定</string>
<string name="show_notification_importance">顯示通知重要程度</string> <string name="show_notification_importance">顯示通知重要程度</string>
<string name="show_notification_importance_summary">顯示 MIUI 12 及之後版本被隱藏的通知重要程度設定</string> <string name="show_notification_importance_summary">顯示 MIUI 12 及之後版本被隱藏的通知重要程度設定</string>
<string name="remove_ad">移除廣告</string> <string name="remove_ad">廣告</string>
<string name="remove_thememanager_ads">移除個性主題廣告</string> <string name="remove_thememanager_ads">拿掉主題壁紙的廣告</string>
<string name="battery_life_function">電池頁面示目前溫度</string> <string name="battery_life_function">電池頁面示目前溫度</string>
<string name="enable_wave_charge_animation">啟用MIX Alpha充電動畫</string> <string name="enable_wave_charge_animation">啟用MIX Alpha充電動畫</string>
<string name="max_wallpaper_scale">桌布縮放比例</string> <string name="max_wallpaper_scale">桌布縮放比例</string>
<string name="def">"預設值: "</string> <string name="def">"預設值: "</string>
<string name="current">目前值:</string> <string name="current">目前值:</string>
<string name="participate_in_translation">參與翻譯</string> <string name="participate_in_translation">參與翻譯</string>
<string name="participate_in_translation_summary">助我們將這個應用程式翻譯您的語言</string> <string name="participate_in_translation_summary">助我們將這個APP翻譯您的語言</string>
<string name="lock_screen_charging_current">充電時顯示目前電流</string> <string name="lock_screen_charging_current">充電時顯示目前電流</string>
<string name="current_current">目前電流</string> <string name="current_current">目前電流</string>
<string name="remove_open_app_confirmation_popup">移除「開啟應用程式」彈出視窗</string> <string name="remove_open_app_confirmation_popup">移除打開應用彈出視窗</string>
<string name="remove_open_app_confirmation_popup_summary">移除XXX 想要開 XXX的彈出視窗</string> <string name="remove_open_app_confirmation_popup_summary">移除 \"XXX 想要開 XXX\" 的彈出視窗</string>
<string name="hide_volume_icon">隱藏音量圖示</string> <string name="hide_volume_icon">隱藏 音量 圖示</string>
<string name="hide_zen_icon">隱藏勿擾圖示</string> <string name="hide_zen_icon">隱藏 勿擾 圖示</string>
<string name="hide_icon">隱藏圖示</string> <string name="hide_icon">隱藏圖示</string>
<string name="double_tap_to_sleep">輕觸兩下鎖定螢幕</string> <string name="double_tap_to_sleep">雙擊鎖定螢幕</string>
<string name="home_double_tap_to_sleep_summary">輕觸兩下空白位置鎖定螢幕</string> <string name="home_double_tap_to_sleep_summary">雙擊空白位置鎖定螢幕</string>
<string name="old_quick_settings_panel">快速設定面板</string> <string name="old_quick_settings_panel">舊快速設定面板</string>
<string name="old_qs_custom_switch">訂行</string> <string name="old_qs_custom_switch">定義行與</string>
<string name="qs_custom_columns_unexpanded"> (未展開)</string> <string name="qs_custom_columns_unexpanded"> (未展開)</string>
<string name="qs_custom_rows"></string> <string name="qs_custom_rows"></string>
<string name="qs_custom_columns"></string> <string name="qs_custom_columns"></string>
<string name="qs_custom_rows_horizontal"> (橫向)</string> <string name="qs_custom_rows_horizontal"> (橫向)</string>
<string name="status_bar_dual_row_network_speed">網路速度</string> <string name="status_bar_dual_row_network_speed">網路速度</string>
<string name="status_bar_dual_row_network_speed_summary">上下網路速度顯示</string> <string name="status_bar_dual_row_network_speed_summary">上下網路速度顯示</string>
<string name="status_bar_network_speed">狀態網路速度</string> <string name="status_bar_network_speed">狀態網路速度</string>
<string name="status_bar_network_speed_dual_row_size">大小 (0無變更)</string> <string name="status_bar_network_speed_dual_row_size">大小0不更改</string>
<string name="status_bar_network_speed_dual_row_icon">圖示</string> <string name="status_bar_network_speed_dual_row_icon">圖示</string>
<string name="none"></string> <string name="none"></string>
<string name="status_bar_network_speed_dual_row_gravity">對齊</string> <string name="status_bar_network_speed_dual_row_gravity">行網速對齊</string>
<string name="left">置左</string> <string name="left">置左</string>
<string name="right">置右</string> <string name="right">置右</string>
<string name="big_mobile_type_icon">行動網路圖示</string> <string name="big_mobile_type_icon">大行動網路圖示</string>
<string name="show_wifi_standard">顯示 WiFi 標準</string> <string name="show_wifi_standard">顯示 Wifi 標準</string>
<string name="can_notification_slide">強制允許所有通知使用小窗</string> <string name="can_notification_slide">強制允許全部通知使用小窗</string>
<string name="battery_percentage_font_size">電量百分比字大小</string> <string name="battery_percentage_font_size">電量百分比字大小</string>
<string name="zero_do_no_change">0無變更</string> <string name="zero_do_no_change">0不修改</string>
<string name="big_mobile_type_icon_size">行動網路圖示大小</string> <string name="big_mobile_type_icon_size">大行動網路圖示大小</string>
<string name="big_mobile_type_icon_bold">行動網路圖示粗</string> <string name="big_mobile_type_icon_bold">大行動網路圖示</string>
<string name="big_mobile_type_icon_up_and_down_position">行動網路圖示上下位置</string> <string name="big_mobile_type_icon_up_and_down_position">大行動網路圖示上下位置</string>
<string name="input_error">輸入錯誤</string> <string name="input_error">輸入錯誤</string>
<string name="range">範圍:</string> <string name="range">範圍:</string>
<string name="big_mobile_type_icon_left_and_right_margins">行動網路圖示左右邊距</string> <string name="big_mobile_type_icon_left_and_right_margins">大行動網路圖示左右邊距</string>
<string name="cast">投放</string> <string name="cast">接力</string>
<string name="force_support_send_app">強制所有應用程式支援在其他裝置開啟</string> <string name="force_support_send_app">允許所有應用使用接力</string>
<string name="status_bar_time_double_line_center_align">列置中對齊</string> <string name="status_bar_time_double_line_center_align">行居中對齊</string>
<string name="default1">預設值</string> <string name="default1">預設值</string>
<string name="clock_center">時鐘置中</string> <string name="clock_center">時鐘置中</string>
<string name="clock_right">時鐘置右</string> <string name="clock_right">時鐘置右</string>
<string name="status_bar_layout_mode">狀態列版面配置模式</string> <string name="status_bar_layout_mode">狀態欄布局模式</string>
<string name="clock_center_and_icon_left">鐘置中 + 圖示置左</string> <string name="clock_center_and_icon_left">間居中+圖示置左</string>
<string name="maximum_number_of_notification_icons">通知圖示最大數量</string> <string name="maximum_number_of_notification_icons">通知圖示最大數量</string>
<string name="maximum_number_of_notification_dots">通知圓點最大數量</string> <string name="maximum_number_of_notification_dots">通知點點數量</string>
<string name="custom_mobile_type_text">自訂行動網路類型文字</string> <string name="custom_mobile_type_text">自訂行動網路類型文字</string>
<string name="custom_mobile_type_text_switch">自訂行動網路類型文字開關</string> <string name="custom_mobile_type_text_switch">自訂行動網路類型文字開關</string>
<string name="downgr">允許降級安裝應用程式</string> <string name="downgr">允許降級安裝應用</string>
<string name="downgr_summary">允許在已安裝新版的情況下覆寫為舊版本</string> <string name="downgr_summary">允許在已安裝新版的情況下覆蓋安裝舊版本</string>
<string name="authcreak">停用安裝程式簽章驗證</string> <string name="authcreak">禁用應用安裝管理器簽名驗證</string>
<string name="authcreak_summary">關閉安裝應用程式時的簽名驗證,可以安裝被修改的 APK</string> <string name="authcreak_summary">關閉安裝應用時的簽名驗證可以安裝被修改的APK</string>
<string name="digestCreak">停用 APK 簽章驗證</string> <string name="digestCreak">禁用APK簽名驗證</string>
<string name="digestCreak_summary">允許安裝套件名稱相同但簽章不同的應用程式</string> <string name="digestCreak_summary">允許覆蓋安裝同包名不同簽名的應用</string>
<string name="UsePreSig">安裝時始終使用已安裝應用程式的簽</string> <string name="UsePreSig">安裝時始終使用已安裝應用的簽</string>
<string name="UsePreSig_summary">安裝時始終使用已安裝應用程式的簽\n這非常<b>危險</b>\n僅在真正需要時啟用</string> <string name="UsePreSig_summary">安裝時始終使用已安裝應用的簽\n這非常<b>危險</b>\n僅在真正需要時啟用</string>
<string name="enhancedMode">增強模式</string> <string name="enhancedMode">增強模式</string>
<string name="enhancedMode_summary">可以解決一些應用程式內部的完整性驗,一般不需要開啟</string> <string name="enhancedMode_summary">可以解決一些應用內部的完整性驗,一般不需要開啟</string>
<string name="rear_display">螢幕 (11 Ultra)</string> <string name="rear_display">後螢幕11Ultra</string>
<string name="lock_screen_clock_display_seconds">時鐘顯示秒數</string> <string name="lock_screen_clock_display_seconds">時鐘顯示秒數</string>
<string name="sound">聲音</string> <string name="sound">聲音</string>
<string name="media_volume_steps_switch">媒體音量階數</string> <string name="media_volume_steps_switch">媒體音量階數</string>
<string name="allow_untrusted_touches">允許不受信任的觸控</string> <string name="allow_untrusted_touches">允許不受信任的觸控</string>
<string name="take_effect_after_reboot">重新開機後生效</string> <string name="take_effect_after_reboot">重新開機後生效</string>
<string name="media_volume_steps_summary">開啟後可能會導致音量列捲動卡頓或藍牙音量異常</string> <string name="media_volume_steps_summary">開啟後可能會導致音量條的滾動卡頓或藍牙音量異常</string>
<string name="can_notification_slide_summary">可能無法支援一些使用小米推送(Mi Push)推播的通知</string> <string name="can_notification_slide_summary">可能無法支援一些使用小米推送(Mi Push)推播的通知</string>
<string name="screen_hole_location">螢幕凹口位置</string> <string name="screen_hole_location">螢幕挖孔位置</string>
<string name="custom_clock_mode">自訂時鐘模式</string> <string name="custom_clock_mode">自訂時鐘模式</string>
<string name="custom_clock_format_geek">時鐘格式</string> <string name="custom_clock_format_geek">時鐘格式</string>
<string name="off">關閉</string> <string name="off">關閉</string>
<string name="center">置中</string> <string name="center">置中</string>
<string name="left_or_right">左右</string> <string name="left_or_right">左右</string>
<string name="preset">預設</string> <string name="pkg_installer">應用包管理組件</string>
<string name="geek">極客</string> <string name="pkg_installer_summary">禁用頻繁安裝應用檢查</string>
<string name="do_not_clear_app">防止終止背景應用程式</string>
<string name="do_not_clear_app_summary">可能會增加耗電,建議配合「使 Millet 更加積極」使用不建議配合墓碑、A1 記憶體管理等會強制應用程式進入快取的模組使用</string>
<string name="make_millet_more_aggressive">使 Millet 更加積極</string>
<string name="make_millet_more_aggressive_summary">允許 Millet 在背景應用程式有通知、有服務執行、有處理程序執行的狀況下凍結應用程式。\n不希望被凍結的應用程式可將省電策略設為無限制\n啟用前請先解除安裝墓碑和 NoANR 相關模組。</string>
<string name="make_millet_ignore_active">允許 Millet 凍結使用中的應用程式</string>
<string name="make_millet_ignore_active_summary">非常積極,可能會影響應用程式執行</string>
<string name="pkg_installer">套件安裝程式</string>
<string name="pkg_installer_summary">停用頻繁應用程式安裝檢查</string>
<string name="big_mobile_type_only_show_network_card">大型行動網路僅會顯示網路卡</string>
<string name="big_mobile_type_location">大型行動網路位置</string>
<string name="miuihome_recentview_remove_card_animation">修改卡片動畫</string>
<string name="miuihome_recentview_remove_card_animation_summary">修改在最近任務介面移除卡片的動畫效果</string>
<string name="miuihome_recentwiew_wallpaper_darkening">停用桌布壓暗</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">這將會停用進出最近任務介面時的桌布壓暗效果</string>
<string name="miuihome_scroll_icon_name">捲動顯示應用程式名稱</string>
<string name="miuihome_scroll_icon_name_summary">過長的應用程式名稱將會捲動,而不會在多列顯示</string>
<string name="miuihome_shortcut_add_small_window">捷徑選單新增小窗</string>
<string name="miuihome_shortcut_add_small_window_summary">長按桌面圖示以快速開啟小窗應用程式</string>
<string name="miuihome_shortcut_add_small_window_title">小窗應用程式</string>
<string name="click_to_view_use_cases">按一下以檢視案例</string>
</resources> </resources>

View File

@@ -43,7 +43,7 @@
<string name="github_url">Welcome more developers to participate in the development</string> <string name="github_url">Welcome more developers to participate in the development</string>
<string name="issues">Feedback/Proposal</string> <string name="issues">Feedback/Proposal</string>
<string name="issues_url">Click to view GitHub Issues</string> <string name="issues_url">Click to view GitHub Issues</string>
<string name="xposeddescription">Customization tool for MIUI13+(Android 12+)</string> <string name="xposeddescription">Customization tool for MIUI13(Android 12)</string>
<string name="statusbar">Status bar</string> <string name="statusbar">Status bar</string>
<string name="status_bar_time_seconds">Display seconds</string> <string name="status_bar_time_seconds">Display seconds</string>
<string name="status_bar_network_speed_refresh_speed">Network speed refresh in seconds</string> <string name="status_bar_network_speed_refresh_speed">Network speed refresh in seconds</string>
@@ -140,7 +140,7 @@
<string name="layout_compatibility_mode">Compatibility mode</string> <string name="layout_compatibility_mode">Compatibility mode</string>
<string name="left_margin">Left margin (0: Auto)</string> <string name="left_margin">Left margin (0: Auto)</string>
<string name="right_margin">Right margin (0: Auto)</string> <string name="right_margin">Right margin (0: Auto)</string>
<string name="layout_compatibility_mode_summary">Force full screen layout (supports all special-shaped screens)</string> <string name="layout_compatibility_mode_summary">Make the left and right hole screen can be displayed normally</string>
<string name="remove_macro_blacklist">Remove game macro blacklist</string> <string name="remove_macro_blacklist">Remove game macro blacklist</string>
<string name="hide_network_speed_splitter">Hide network speed splitter</string> <string name="hide_network_speed_splitter">Hide network speed splitter</string>
<string name="updater">Updater</string> <string name="updater">Updater</string>
@@ -239,17 +239,4 @@
<string name="make_millet_ignore_active_summary">Very aggressive and may affect application running</string> <string name="make_millet_ignore_active_summary">Very aggressive and may affect application running</string>
<string name="pkg_installer">Package Installer</string> <string name="pkg_installer">Package Installer</string>
<string name="pkg_installer_summary">Disable the app installation\'s count checking</string> <string name="pkg_installer_summary">Disable the app installation\'s count checking</string>
<string name="big_mobile_type_only_show_network_card">Big mobile type only show network card</string>
<string name="big_mobile_type_location">Big mobile type location</string>
<string name="miuihome_recentview_remove_card_animation">Modify the card marking animation</string>
<string name="miuihome_recentview_remove_card_animation_summary">Modify the animation effect of the recent task removal card</string>
<string name="miuihome_recentwiew_wallpaper_darkening">Disable wallpaper dimming</string>
<string name="miuihome_recentwiew_wallpaper_darkening_summary">This will disable the effect that the wallpaper will gradually brighten from dimming when going in and out of the recent task</string>
<string name="miuihome_scroll_icon_name">Scroll app name</string>
<string name="miuihome_scroll_icon_name_summary">The application name that is too long will be scrolled and displayed without any new line</string>
<string name="miuihome_shortcut_add_small_window">Shortcut Menu Add Window</string>
<string name="miuihome_shortcut_add_small_window_summary">Press and hold the desktop icon to add a quick open window</string>
<string name="miuihome_shortcut_add_small_window_title">Small window</string>
<string name="click_to_view_use_cases">Click to view use cases</string>
<string name="disable_bluetooth_temporarily_off">Disable bluetooth temporarily off</string>
</resources> </resources>

View File

@@ -5,7 +5,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath("com.android.tools.build:gradle:7.4.1") classpath("com.android.tools.build:gradle:7.4.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0")
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong

View File

@@ -7,4 +7,5 @@ dependencyResolutionManagement {
} }
} }
rootProject.name = "WooBoxForMIUI" rootProject.name = "WooBoxForMIUI"
include(":app", ":blockmiui") include(":app")
include(":blockmiui")