v3.39(versionCode 60)
This commit is contained in:
@@ -20,6 +20,7 @@ import android.widget.FrameLayout
|
|||||||
import android.widget.ProgressBar
|
import android.widget.ProgressBar
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.view.WindowInsetsControllerCompat
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -70,6 +71,11 @@ class ImagePreviewActivity : AppCompatActivity() {
|
|||||||
// 看图页固定黑底,状态栏与导航栏一并压黑,避免白边割裂画面
|
// 看图页固定黑底,状态栏与导航栏一并压黑,避免白边割裂画面
|
||||||
window.statusBarColor = Color.BLACK
|
window.statusBarColor = Color.BLACK
|
||||||
window.navigationBarColor = Color.BLACK
|
window.navigationBarColor = Color.BLACK
|
||||||
|
// 黑底必须配浅色系统图标:浅色主题默认是深色图标,压黑后就看不清了
|
||||||
|
WindowInsetsControllerCompat(window, window.decorView).apply {
|
||||||
|
isAppearanceLightStatusBars = false
|
||||||
|
isAppearanceLightNavigationBars = false
|
||||||
|
}
|
||||||
|
|
||||||
val root = FrameLayout(this).apply { setBackgroundColor(Color.BLACK) }
|
val root = FrameLayout(this).apply { setBackgroundColor(Color.BLACK) }
|
||||||
|
|
||||||
|
|||||||
@@ -1215,6 +1215,9 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
)
|
)
|
||||||
WindowInsetsControllerCompat(w, w.decorView).apply {
|
WindowInsetsControllerCompat(w, w.decorView).apply {
|
||||||
hide(WindowInsetsCompat.Type.statusBars())
|
hide(WindowInsetsCompat.Type.statusBars())
|
||||||
|
// 导航栏压黑了,图标必须反过来用浅色,否则浅色主题下是黑底黑键
|
||||||
|
isAppearanceLightNavigationBars = false
|
||||||
|
isAppearanceLightStatusBars = false
|
||||||
systemBarsBehavior =
|
systemBarsBehavior =
|
||||||
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user