优化
This commit is contained in:
@@ -108,7 +108,8 @@ abstract class BaseReadBookActivity :
|
|||||||
*/
|
*/
|
||||||
fun upSystemUiVisibility(
|
fun upSystemUiVisibility(
|
||||||
isInMultiWindow: Boolean,
|
isInMultiWindow: Boolean,
|
||||||
toolBarHide: Boolean = true
|
toolBarHide: Boolean = true,
|
||||||
|
useBgMeanColor: Boolean = false
|
||||||
) {
|
) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
window.insetsController?.run {
|
window.insetsController?.run {
|
||||||
@@ -129,7 +130,10 @@ abstract class BaseReadBookActivity :
|
|||||||
setLightStatusBar(ReadBookConfig.durConfig.curStatusIconDark())
|
setLightStatusBar(ReadBookConfig.durConfig.curStatusIconDark())
|
||||||
} else {
|
} else {
|
||||||
val statusBarColor =
|
val statusBarColor =
|
||||||
if (AppConfig.readBarStyleFollowPage && ReadBookConfig.durConfig.curBgType() == 0) {
|
if (AppConfig.readBarStyleFollowPage
|
||||||
|
&& ReadBookConfig.durConfig.curBgType() == 0
|
||||||
|
|| useBgMeanColor
|
||||||
|
) {
|
||||||
ReadBookConfig.bgMeanColor
|
ReadBookConfig.bgMeanColor
|
||||||
} else {
|
} else {
|
||||||
ThemeStore.statusBarColor(this, AppConfig.isTransparentStatusBar)
|
ThemeStore.statusBarColor(this, AppConfig.isTransparentStatusBar)
|
||||||
@@ -184,12 +188,14 @@ abstract class BaseReadBookActivity :
|
|||||||
width = MATCH_PARENT
|
width = MATCH_PARENT
|
||||||
gravity = Gravity.BOTTOM
|
gravity = Gravity.BOTTOM
|
||||||
}
|
}
|
||||||
|
|
||||||
Gravity.LEFT -> layoutParams =
|
Gravity.LEFT -> layoutParams =
|
||||||
(layoutParams as FrameLayout.LayoutParams).apply {
|
(layoutParams as FrameLayout.LayoutParams).apply {
|
||||||
height = MATCH_PARENT
|
height = MATCH_PARENT
|
||||||
width = navigationBarHeight
|
width = navigationBarHeight
|
||||||
gravity = Gravity.LEFT
|
gravity = Gravity.LEFT
|
||||||
}
|
}
|
||||||
|
|
||||||
Gravity.RIGHT -> layoutParams =
|
Gravity.RIGHT -> layoutParams =
|
||||||
(layoutParams as FrameLayout.LayoutParams).apply {
|
(layoutParams as FrameLayout.LayoutParams).apply {
|
||||||
height = MATCH_PARENT
|
height = MATCH_PARENT
|
||||||
|
|||||||
@@ -1044,7 +1044,7 @@ class ReadBookActivity : BaseReadBookActivity(),
|
|||||||
* 更新状态栏,导航栏
|
* 更新状态栏,导航栏
|
||||||
*/
|
*/
|
||||||
override fun upSystemUiVisibility() {
|
override fun upSystemUiVisibility() {
|
||||||
upSystemUiVisibility(isInMultiWindow, !menuLayoutIsVisible)
|
upSystemUiVisibility(isInMultiWindow, !menuLayoutIsVisible, bottomDialog > 0)
|
||||||
upNavigationBarColor()
|
upNavigationBarColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user