├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── xposed_init │ ├── ic_launcher-playstore.png │ ├── java │ └── cn │ │ └── houkyo │ │ └── miuidock │ │ ├── DefaultValue.kt │ │ ├── MainActivity.kt │ │ ├── MainHook.kt │ │ ├── Utils.kt │ │ └── ui │ │ └── CustomSeekBar.kt │ └── res │ ├── drawable-v24 │ └── ic_launcher_foreground.xml │ ├── drawable │ └── ic_launcher_background.xml │ ├── layout │ ├── activity_main.xml │ └── custom_seek_bar.xml │ ├── menu │ └── menu.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ ├── ic_launcher_background.png │ ├── ic_launcher_foreground.png │ └── ic_launcher_round.png │ ├── values-night │ └── themes.xml │ ├── values-zh-rCN │ └── strings.xml │ └── values │ ├── arrays.xml │ ├── colors.xml │ ├── strings.xml │ └── themes.xml ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | MIT License (MIT) 3 | 4 | Copyright © 2021 Houkyo 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 7 | associated documentation files (the “Software”), to deal in the Software without restriction, 8 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all copies or substantial 13 | portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 16 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 18 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 19 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## MIUIDock 2 | 一个xposed模块,将MIUI高斯模糊的搜索栏修改成Dock背景 3 | 4 | ### 模糊条件 5 | + Android 11 以上 6 | + `build.prop` 中 `ro.miui.backdrop_sampling_enabled = true` 7 | 8 | ### 使用前须知 9 | 1. 推荐使用[LSPosed](https://github.com/LSPosed/LSPosed),请在设置内开启资源钩子 10 | 2. 本项目只适配最新的RELEASE版本,如果有Bug,请提交issues,如果你使用的是ALPHA(内测)版本的桌面,请自行修改代码编译 11 | 12 | ### 其他项目 13 | + [MIDock](https://github.com/lamprose/MIDock): 基于本项目的更加轻量级的Dock模块 14 | + [MiuiHome](https://github.com/1767523953/MiuiHome): 更加完整的桌面动画、模糊设置模块 15 | 16 | ### 鸣谢 17 | 感谢各位关注本项目的同学,特别感谢以下同学为本项目做出的贡献(排名不分先后) 18 | + [Hwwwww](https://github.com/HwwwwwLemon) 19 | + [lamprose](https://github.com/lamprose) 20 | 21 | ### License 22 | 本项目基于[MIT](https://github.com/ouhoukyo/MIUIDock/blob/master/LICENSE)协议开源 -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'kotlin-android' 4 | } 5 | 6 | android { 7 | compileSdkVersion 30 8 | buildToolsVersion "30.0.3" 9 | 10 | defaultConfig { 11 | applicationId "cn.houkyo.miuidock" 12 | minSdkVersion 28 13 | targetSdkVersion 30 14 | versionCode 10305 15 | versionName "1.3.5" 16 | 17 | ndk { 18 | abiFilters 'arm64-v8a' 19 | } 20 | } 21 | 22 | buildTypes { 23 | release { 24 | minifyEnabled false 25 | zipAlignEnabled true 26 | } 27 | } 28 | 29 | compileOptions { 30 | sourceCompatibility JavaVersion.VERSION_1_8 31 | targetCompatibility JavaVersion.VERSION_1_8 32 | } 33 | 34 | kotlinOptions { 35 | jvmTarget = '1.8' 36 | } 37 | } 38 | 39 | dependencies { 40 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 41 | implementation 'androidx.core:core-ktx:1.3.2' 42 | implementation 'androidx.appcompat:appcompat:1.2.0' 43 | implementation 'com.google.android.material:material:1.3.0' 44 | implementation 'com.github.kyuubiran:EzXHelper:0.0.4' 45 | compileOnly 'de.robv.android.xposed:api:82' 46 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 37 | 40 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /app/src/main/assets/xposed_init: -------------------------------------------------------------------------------- 1 | cn.houkyo.miuidock.MainHook -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ouhoukyo/MIUIDock/0939031e87bc2a0e8e29a250bc7cb7da046101b4/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/java/cn/houkyo/miuidock/DefaultValue.kt: -------------------------------------------------------------------------------- 1 | package cn.houkyo.miuidock 2 | 3 | class DefaultValue { 4 | val radius = 20 5 | val height = 84 6 | val sideMargin = 30 7 | val bottomMargin = 23 8 | val highLevel = 1 9 | val hideIcon = 0 10 | val iconBottomMargin = 35 11 | } -------------------------------------------------------------------------------- /app/src/main/java/cn/houkyo/miuidock/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package cn.houkyo.miuidock 2 | 3 | import android.annotation.SuppressLint 4 | import android.content.ComponentName 5 | import android.content.Intent 6 | import android.content.pm.PackageManager 7 | import android.net.Uri 8 | import android.os.Bundle 9 | import android.provider.Settings 10 | import android.view.Menu 11 | import android.view.MenuItem 12 | import android.widget.Toast 13 | import android.widget.Switch 14 | import android.widget.Button 15 | import androidx.appcompat.app.AlertDialog 16 | import androidx.appcompat.app.AppCompatActivity 17 | import cn.houkyo.miuidock.ui.CustomSeekBar 18 | import java.io.DataOutputStream 19 | 20 | @SuppressLint("UseSwitchCompatOrMaterialCode") 21 | class MainActivity : AppCompatActivity() { 22 | private var radius = DefaultValue().radius 23 | private var height = DefaultValue().height 24 | private var sideMargin = DefaultValue().sideMargin 25 | private var bottomMargin = DefaultValue().bottomMargin 26 | private var iconBottomMargin = DefaultValue().iconBottomMargin 27 | private var highLevel = DefaultValue().highLevel 28 | private var hideIcon = DefaultValue().hideIcon 29 | private var HideIconMenu: MenuItem? = null 30 | 31 | override fun onCreate(savedInstanceState: Bundle?) { 32 | super.onCreate(savedInstanceState) 33 | setContentView(R.layout.activity_main) 34 | if (!isModuleEnable()) { 35 | val toast = Toast(this) 36 | toast.setText(R.string.module_not_enable) 37 | toast.show() 38 | } 39 | radius = Utils().getData(this, "DOCK_RADIUS", radius) 40 | height = Utils().getData(this, "DOCK_HEIGHT", height) 41 | sideMargin = Utils().getData(this, "DOCK_SIDE", sideMargin) 42 | bottomMargin = Utils().getData(this, "DOCK_BOTTOM", bottomMargin) 43 | iconBottomMargin = Utils().getData(this, "DOCK_ICON_BOTTOM", iconBottomMargin) 44 | highLevel = Utils().getData(this, "HIGH_LEVEL", highLevel) 45 | hideIcon = Utils().getData(this, "HIDE_ICON", hideIcon) 46 | init() 47 | } 48 | 49 | override fun onCreateOptionsMenu(menu: Menu): Boolean { 50 | menuInflater.inflate(R.menu.menu, menu) 51 | HideIconMenu = menu.findItem(R.id.menu_hide_icon) 52 | return true 53 | } 54 | 55 | override fun onPrepareOptionsMenu(menu: Menu?): Boolean { 56 | if (hideIcon == 0) { 57 | HideIconMenu?.setTitle(R.string.hide_app_icon) 58 | } else { 59 | HideIconMenu?.setTitle(R.string.show_app_icon) 60 | } 61 | return super.onPrepareOptionsMenu(menu) 62 | } 63 | 64 | override fun onOptionsItemSelected(item: MenuItem): Boolean { 65 | val HideIcon = R.id.menu_hide_icon 66 | val GoToSetting = R.id.menu_to_setting 67 | val About = R.id.menu_about 68 | when (item.getItemId()) { 69 | HideIcon -> handleHideIcon() 70 | GoToSetting -> goToSetting() 71 | About -> showAbout() 72 | } 73 | return true; 74 | } 75 | 76 | private fun init() { 77 | val RadiusSeekBar = findViewById(R.id.dockRadiusSeekBar) 78 | val HeightSeekBar = findViewById(R.id.dockHeightSeekBar) 79 | val SideSeekBar = findViewById(R.id.dockSideSeekBar) 80 | val BottomSeekBar = findViewById(R.id.dockBottomSeekBar) 81 | val IconBottomSeekBar = findViewById(R.id.dockIconBottomSeekBar) 82 | val HighLevelSwitch = findViewById(R.id.highLevelSwitch) 83 | val SaveButton = findViewById