Merge remote-tracking branch 'origin/master'

This commit is contained in:
kunfei committed 2022-05-18 12:22:02 +08:00
commit 80edb670fb
6 files changed
+13 -19

No files matched your search

@@ -570,20 +570,14 @@ object ReadBookConfig {
bgDrawable = when (curBgType()) {
0 -> ColorDrawable(Color.parseColor(curBgStr()))
1 -> {
BitmapDrawable(
resources,
BitmapUtils.decodeAssetsBitmap(
appCtx,
"bg" + File.separator + curBgStr(),
width,
height
)
)
val path = "bg" + File.separator + curBgStr()
val bitmap = BitmapUtils.decodeAssetsBitmap(appCtx, path, width, height)
BitmapDrawable(resources, bitmap)
}
else -> {
val bitmap = BitmapUtils.decodeBitmap(curBgStr(), width, height)
BitmapDrawable(resources, bitmap)
}
else -> BitmapDrawable(
resources,
BitmapUtils.decodeBitmap(curBgStr(), width, height)
)
}
} catch (e: OutOfMemoryError) {
e.printOnDebug()