diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt index 6281569e5..9c33b0f67 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt @@ -139,17 +139,16 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at } else { ChapterProvider.contentPaint } - textPaint.color = - if (isReadAloud) context.accentColor else ReadBookConfig.textColor + val textColor = if (isReadAloud) context.accentColor else ReadBookConfig.textColor textChars.forEach { if (it.isImage) { drawImage(canvas, it, lineTop, lineBottom, isImageLine) } else { + textPaint.color = textColor if(it.isSearchResult) { textPaint.color = context.accentColor } canvas.drawText(it.charData, it.start, lineBase, textPaint) - textPaint.color = ReadBookConfig.textColor } if (it.selected) { canvas.drawRect(it.start, lineTop, it.end, lineBottom, selectedPaint)