diff --git a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt index e64df6781..689eae713 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/PageView.kt @@ -7,10 +7,7 @@ import android.util.AttributeSet import android.view.MotionEvent import android.widget.FrameLayout import io.legado.app.help.ReadBookConfig -import io.legado.app.ui.widget.page.delegate.CoverPageDelegate -import io.legado.app.ui.widget.page.delegate.NoAnimPageDelegate -import io.legado.app.ui.widget.page.delegate.PageDelegate -import io.legado.app.ui.widget.page.delegate.SlidePageDelegate +import io.legado.app.ui.widget.page.delegate.* import io.legado.app.utils.activity import io.legado.app.utils.getPrefInt @@ -140,9 +137,10 @@ class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, att fun upPageAnim() { pageDelegate = when (context.getPrefInt("pageAnim")) { + 0 -> CoverPageDelegate(this) 1 -> SlidePageDelegate(this) - 2 -> NoAnimPageDelegate(this) - else -> CoverPageDelegate(this) + 2 -> ScrollPageDelegate(this) + else -> NoAnimPageDelegate(this) } } diff --git a/app/src/main/java/io/legado/app/ui/widget/page/delegate/ScrollPageDelegate.kt b/app/src/main/java/io/legado/app/ui/widget/page/delegate/ScrollPageDelegate.kt new file mode 100644 index 000000000..2da678320 --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/widget/page/delegate/ScrollPageDelegate.kt @@ -0,0 +1,21 @@ +package io.legado.app.ui.widget.page.delegate + +import android.graphics.Canvas +import io.legado.app.ui.widget.page.PageView + +class ScrollPageDelegate(pageView: PageView) : PageDelegate(pageView) { + + override fun onScrollStart() { + + } + + override fun onDraw(canvas: Canvas) { + + } + + override fun onScrollStop() { + + } + + +} \ No newline at end of file