|
|
@ -17,6 +17,7 @@ import io.legado.app.ui.book.read.page.provider.ChapterProvider |
|
|
|
import io.legado.app.utils.activity |
|
|
|
import io.legado.app.utils.activity |
|
|
|
import io.legado.app.utils.screenshot |
|
|
|
import io.legado.app.utils.screenshot |
|
|
|
import kotlinx.android.synthetic.main.activity_book_read.view.* |
|
|
|
import kotlinx.android.synthetic.main.activity_book_read.view.* |
|
|
|
|
|
|
|
import java.util.* |
|
|
|
|
|
|
|
|
|
|
|
class PageView(context: Context, attrs: AttributeSet) : |
|
|
|
class PageView(context: Context, attrs: AttributeSet) : |
|
|
|
FrameLayout(context, attrs), |
|
|
|
FrameLayout(context, attrs), |
|
|
@ -109,7 +110,9 @@ class PageView(context: Context, attrs: AttributeSet) : |
|
|
|
fun upPageAnim() { |
|
|
|
fun upPageAnim() { |
|
|
|
pageDelegate?.onDestroy() |
|
|
|
pageDelegate?.onDestroy() |
|
|
|
pageDelegate = null |
|
|
|
pageDelegate = null |
|
|
|
pageDelegate = when (ReadBookConfig.pageAnim) { |
|
|
|
pageDelegate = if (ReadBook.imageStyle?.toUpperCase(Locale.ROOT) == "FULL") { |
|
|
|
|
|
|
|
ScrollPageDelegate(this) |
|
|
|
|
|
|
|
} else when (ReadBookConfig.pageAnim) { |
|
|
|
0 -> CoverPageDelegate(this) |
|
|
|
0 -> CoverPageDelegate(this) |
|
|
|
1 -> SlidePageDelegate(this) |
|
|
|
1 -> SlidePageDelegate(this) |
|
|
|
2 -> SimulationPageDelegate(this) |
|
|
|
2 -> SimulationPageDelegate(this) |
|
|
|