优化强调色和文字颜色一样是文字颜色的显示

pull/1835/head
kunfei 3 years ago
parent d66cace0a7
commit b54029b9a7
  1. 9
      app/src/main/java/io/legado/app/ui/widget/text/AccentStrokeTextView.kt

@ -37,16 +37,21 @@ class AccentStrokeTextView(context: Context, attrs: AttributeSet) :
} else {
context.getCompatColor(R.color.disabled)
}
val accentColor = if (isInEditMode) {
context.getCompatColor(R.color.accent)
} else {
ThemeStore.accentColor(context)
}
background = Selector.shapeBuild()
.setCornerRadius(radius)
.setStrokeWidth(1.dpToPx())
.setDisabledStrokeColor(disableColor)
.setDefaultStrokeColor(ThemeStore.accentColor(context))
.setDefaultStrokeColor(accentColor)
.setPressedBgColor(context.getCompatColor(R.color.transparent30))
.create()
setTextColor(
Selector.colorBuild()
.setDefaultColor(ThemeStore.accentColor(context))
.setDefaultColor(accentColor)
.setDisabledColor(disableColor)
.create()
)

Loading…
Cancel
Save