From 6307c5dc8598bdcd293062da34b0220cad2c3af4 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 11 Sep 2022 17:47:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/read/page/ContentTextView.kt | 8 +++++++- .../legado/app/ui/book/read/page/entities/TextLine.kt | 1 + .../legado/app/ui/book/read/page/entities/TextPage.kt | 1 + .../book/read/page/entities/{ => column}/BaseColumn.kt | 2 +- .../ui/book/read/page/entities/column/ButtonColumn.kt | 10 ++++++++++ .../read/page/entities/{ => column}/ImageColumn.kt | 2 +- .../read/page/entities/{ => column}/ReviewColumn.kt | 2 +- .../book/read/page/entities/{ => column}/TextColumn.kt | 2 +- .../app/ui/book/read/page/provider/ChapterProvider.kt | 7 ++++++- 9 files changed, 29 insertions(+), 6 deletions(-) rename app/src/main/java/io/legado/app/ui/book/read/page/entities/{ => column}/BaseColumn.kt (74%) create mode 100644 app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ButtonColumn.kt rename app/src/main/java/io/legado/app/ui/book/read/page/entities/{ => column}/ImageColumn.kt (64%) rename app/src/main/java/io/legado/app/ui/book/read/page/entities/{ => column}/ReviewColumn.kt (97%) rename app/src/main/java/io/legado/app/ui/book/read/page/entities/{ => column}/TextColumn.kt (74%) 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 40f8912b9..2a1676836 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 @@ -15,7 +15,13 @@ import io.legado.app.help.config.AppConfig import io.legado.app.help.config.ReadBookConfig import io.legado.app.lib.theme.accentColor import io.legado.app.model.ReadBook -import io.legado.app.ui.book.read.page.entities.* +import io.legado.app.ui.book.read.page.entities.TextLine +import io.legado.app.ui.book.read.page.entities.TextPage +import io.legado.app.ui.book.read.page.entities.TextPos +import io.legado.app.ui.book.read.page.entities.column.BaseColumn +import io.legado.app.ui.book.read.page.entities.column.ImageColumn +import io.legado.app.ui.book.read.page.entities.column.ReviewColumn +import io.legado.app.ui.book.read.page.entities.column.TextColumn import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.ui.book.read.page.provider.ImageProvider import io.legado.app.ui.book.read.page.provider.TextPageFactory diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextLine.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextLine.kt index c5a1f17f0..ea4b8bd08 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextLine.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextLine.kt @@ -1,6 +1,7 @@ package io.legado.app.ui.book.read.page.entities import android.text.TextPaint +import io.legado.app.ui.book.read.page.entities.column.BaseColumn import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.utils.textHeight diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt index 934021bd4..3c69c1e19 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt @@ -5,6 +5,7 @@ import android.text.StaticLayout import io.legado.app.R import io.legado.app.help.config.ReadBookConfig import io.legado.app.model.ReadBook +import io.legado.app.ui.book.read.page.entities.column.TextColumn import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.utils.textHeight import splitties.init.appCtx diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/BaseColumn.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/BaseColumn.kt similarity index 74% rename from app/src/main/java/io/legado/app/ui/book/read/page/entities/BaseColumn.kt rename to app/src/main/java/io/legado/app/ui/book/read/page/entities/column/BaseColumn.kt index f67340272..6516e5f0d 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/BaseColumn.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/BaseColumn.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.book.read.page.entities +package io.legado.app.ui.book.read.page.entities.column /** * 列基类 diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ButtonColumn.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ButtonColumn.kt new file mode 100644 index 000000000..33f4f0f88 --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ButtonColumn.kt @@ -0,0 +1,10 @@ +package io.legado.app.ui.book.read.page.entities.column + + +/** + * 按钮列 + */ +data class ButtonColumn( + override var start: Float, + override var end: Float +) : BaseColumn \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/ImageColumn.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ImageColumn.kt similarity index 64% rename from app/src/main/java/io/legado/app/ui/book/read/page/entities/ImageColumn.kt rename to app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ImageColumn.kt index c6e590c5d..80b38a538 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/ImageColumn.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ImageColumn.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.book.read.page.entities +package io.legado.app.ui.book.read.page.entities.column /** * 图片列 diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/ReviewColumn.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ReviewColumn.kt similarity index 97% rename from app/src/main/java/io/legado/app/ui/book/read/page/entities/ReviewColumn.kt rename to app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ReviewColumn.kt index eec638755..7318e5f33 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/ReviewColumn.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/ReviewColumn.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.book.read.page.entities +package io.legado.app.ui.book.read.page.entities.column import android.graphics.Canvas import android.graphics.Paint diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextColumn.kt b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/TextColumn.kt similarity index 74% rename from app/src/main/java/io/legado/app/ui/book/read/page/entities/TextColumn.kt rename to app/src/main/java/io/legado/app/ui/book/read/page/entities/column/TextColumn.kt index baea7c2cc..0733c3b95 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/entities/TextColumn.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/entities/column/TextColumn.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.book.read.page.entities +package io.legado.app.ui.book.read.page.entities.column /** * 文字列 diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt index 267cf24a2..fad724fc1 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt @@ -13,7 +13,12 @@ import io.legado.app.data.entities.BookChapter import io.legado.app.help.config.AppConfig import io.legado.app.help.config.ReadBookConfig import io.legado.app.model.ReadBook -import io.legado.app.ui.book.read.page.entities.* +import io.legado.app.ui.book.read.page.entities.TextChapter +import io.legado.app.ui.book.read.page.entities.TextLine +import io.legado.app.ui.book.read.page.entities.TextPage +import io.legado.app.ui.book.read.page.entities.column.ImageColumn +import io.legado.app.ui.book.read.page.entities.column.ReviewColumn +import io.legado.app.ui.book.read.page.entities.column.TextColumn import io.legado.app.utils.* import splitties.init.appCtx import java.util.*