pull/32/head
kunfei 5 years ago
parent 21c02f08d2
commit 539e2ed2b0
  1. 10
      app/src/main/java/io/legado/app/help/ReadBookConfig.kt

@ -46,7 +46,15 @@ object ReadBookConfig {
when (bgType) { when (bgType) {
0 -> bg = ColorDrawable(Color.parseColor(bgStr)) 0 -> bg = ColorDrawable(Color.parseColor(bgStr))
1 -> bg = Drawable.createFromStream(App.INSTANCE.assets.open("bg" + File.separator + bgStr), "bg") 1 -> bg = Drawable.createFromStream(App.INSTANCE.assets.open("bg" + File.separator + bgStr), "bg")
2 -> bg = Drawable.createFromPath(bgStr) else -> {
try {
bg = Drawable.createFromPath(bgStr)
} finally {
bg ?: let {
bg = ColorDrawable(Color.parseColor("#015A86"))
}
}
}
} }
} }
} }

Loading…
Cancel
Save