From f82757ab8043b7cf485116bab80f83f74f990287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=A1=E3=81=84=E5=A4=8F?= <93428659+lightsummer233@users.noreply.github.com> Date: Sat, 16 Dec 2023 17:10:38 +0800 Subject: [PATCH] Updater: Make NavBar background transparent on MIUI/HyperOS (#3) --- app/src/main/java/top/yukonga/update/ui/MainActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/top/yukonga/update/ui/MainActivity.kt b/app/src/main/java/top/yukonga/update/ui/MainActivity.kt index 622bab14..3b1cfaa7 100644 --- a/app/src/main/java/top/yukonga/update/ui/MainActivity.kt +++ b/app/src/main/java/top/yukonga/update/ui/MainActivity.kt @@ -4,6 +4,7 @@ import android.content.ClipData import android.content.ClipboardManager import android.content.Context import android.content.SharedPreferences +import android.os.Build import android.os.Bundle import android.text.Html import android.text.InputType @@ -60,6 +61,9 @@ class MainActivity : AppCompatActivity() { // Enable edge to edge. enableEdgeToEdge() + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { + window.isNavigationBarContrastEnforced = false + } // Inflate view. _activityMainBinding = ActivityMainBinding.inflate(layoutInflater)