diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt index d4d6310f7..ba08b92c4 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/ChapterProvider.kt @@ -139,6 +139,9 @@ object ChapterProvider { ) } + /** + * 标题 + */ private fun joinTitle( title: String, y: Int, @@ -218,6 +221,9 @@ object ChapterProvider { return durY } + /** + * 正文 + */ private fun joinBody( text: String, y: Int, @@ -255,6 +261,7 @@ object ChapterProvider { ) var words = text.substring(layout.getLineStart(lineIndex), layout.getLineEnd(lineIndex)) + stringBuilder.append(words) val desiredWidth = layout.getLineMax(lineIndex) if (lineIndex == 0 && layout.lineCount > 1) { //第一行 @@ -289,6 +296,7 @@ object ChapterProvider { } } else if (lineIndex == layout.lineCount - 1) { //最后一行 + stringBuilder.append("\n") var x = 0 for (i in words.indices) { val char = words[i].toString()