透明模式下书籍详情页优化 #386
This commit is contained in:
@@ -26,7 +26,8 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
|
|||||||
val isCronet = appCtx.getPrefBoolean(PreferKey.cronet)
|
val isCronet = appCtx.getPrefBoolean(PreferKey.cronet)
|
||||||
var useAntiAlias = appCtx.getPrefBoolean(PreferKey.antiAlias)
|
var useAntiAlias = appCtx.getPrefBoolean(PreferKey.antiAlias)
|
||||||
var userAgent: String = getPrefUserAgent()
|
var userAgent: String = getPrefUserAgent()
|
||||||
var isEInkMode = appCtx.getPrefString(PreferKey.themeMode) == "3"
|
var isEInkMode = appCtx.getPrefString("app_theme", "0") == "4"
|
||||||
|
var isTransparent = appCtx.getPrefString("app_theme", "0") == "13"
|
||||||
var customMode = appCtx.getPrefString(PreferKey.customMode)
|
var customMode = appCtx.getPrefString(PreferKey.customMode)
|
||||||
var clickActionTL = appCtx.getPrefInt(PreferKey.clickActionTL, 2)
|
var clickActionTL = appCtx.getPrefInt(PreferKey.clickActionTL, 2)
|
||||||
var clickActionTC = appCtx.getPrefInt(PreferKey.clickActionTC, 2)
|
var clickActionTC = appCtx.getPrefInt(PreferKey.clickActionTC, 2)
|
||||||
|
|||||||
@@ -552,9 +552,12 @@ class BookInfoActivity :
|
|||||||
color = Color.BLACK
|
color = Color.BLACK
|
||||||
}
|
}
|
||||||
binding.cdInfo?.setCardBackgroundColor(color)
|
binding.cdInfo?.setCardBackgroundColor(color)
|
||||||
binding.llInfo.setBackgroundColor(color)
|
if (!AppConfig.isTransparent)
|
||||||
(binding.llCover.background as? GradientDrawable)?.colors =
|
{
|
||||||
intArrayOf(Color.TRANSPARENT, color)
|
binding.llInfo.setBackgroundColor(color)
|
||||||
|
(binding.llCover.background as? GradientDrawable)?.colors =
|
||||||
|
intArrayOf(Color.TRANSPARENT, color)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -592,7 +595,8 @@ class BookInfoActivity :
|
|||||||
duration = 400L
|
duration = 400L
|
||||||
addUpdateListener { animation ->
|
addUpdateListener { animation ->
|
||||||
val color = animation.animatedValue as Int
|
val color = animation.animatedValue as Int
|
||||||
binding.bgBookMask.setBackgroundColor(color)
|
if (!AppConfig.isTransparent)
|
||||||
|
binding.bgBookMask.setBackgroundColor(color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user