|
|
@ -95,7 +95,7 @@ object ReadBookConfig { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
data class Config( |
|
|
|
data class Config( |
|
|
|
var bgStr: String = "#015A86", |
|
|
|
var bgStr: String = "#EEEEEE", |
|
|
|
var bgStrNight: String = "#000000", |
|
|
|
var bgStrNight: String = "#000000", |
|
|
|
var bgType: Int = 0, |
|
|
|
var bgType: Int = 0, |
|
|
|
var bgTypeNight: Int = 0, |
|
|
|
var bgTypeNight: Int = 0, |
|
|
@ -164,6 +164,7 @@ object ReadBookConfig { |
|
|
|
|
|
|
|
|
|
|
|
fun bgDrawable(): Drawable { |
|
|
|
fun bgDrawable(): Drawable { |
|
|
|
var bgDrawable: Drawable? = null |
|
|
|
var bgDrawable: Drawable? = null |
|
|
|
|
|
|
|
kotlin.runCatching { |
|
|
|
when (bgType()) { |
|
|
|
when (bgType()) { |
|
|
|
0 -> bgDrawable = ColorDrawable(Color.parseColor(bgStr())) |
|
|
|
0 -> bgDrawable = ColorDrawable(Color.parseColor(bgStr())) |
|
|
|
1 -> bgDrawable = |
|
|
|
1 -> bgDrawable = |
|
|
@ -175,6 +176,7 @@ object ReadBookConfig { |
|
|
|
bgDrawable = Drawable.createFromPath(bgStr) |
|
|
|
bgDrawable = Drawable.createFromPath(bgStr) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return bgDrawable ?: ColorDrawable(Color.parseColor("#015A86")) |
|
|
|
return bgDrawable ?: ColorDrawable(Color.parseColor("#015A86")) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|