|
|
@ -15,6 +15,7 @@ import io.legado.app.help.ReadBookConfig |
|
|
|
import io.legado.app.ui.book.read.page.ContentView |
|
|
|
import io.legado.app.ui.book.read.page.ContentView |
|
|
|
import io.legado.app.ui.book.read.page.PageView |
|
|
|
import io.legado.app.ui.book.read.page.PageView |
|
|
|
import kotlin.math.abs |
|
|
|
import kotlin.math.abs |
|
|
|
|
|
|
|
import io.legado.app.R |
|
|
|
|
|
|
|
|
|
|
|
abstract class PageDelegate(protected val pageView: PageView) : |
|
|
|
abstract class PageDelegate(protected val pageView: PageView) : |
|
|
|
GestureDetector.SimpleOnGestureListener() { |
|
|
|
GestureDetector.SimpleOnGestureListener() { |
|
|
@ -316,7 +317,7 @@ abstract class PageDelegate(protected val pageView: PageView) : |
|
|
|
val hasPrev = pageView.pageFactory.hasPrev() |
|
|
|
val hasPrev = pageView.pageFactory.hasPrev() |
|
|
|
if (!hasPrev) { |
|
|
|
if (!hasPrev) { |
|
|
|
if (!snackBar.isShown) { |
|
|
|
if (!snackBar.isShown) { |
|
|
|
snackBar.setText("没有上一页") |
|
|
|
snackBar.setText(R.string.no_prev_page) |
|
|
|
snackBar.show() |
|
|
|
snackBar.show() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -330,7 +331,7 @@ abstract class PageDelegate(protected val pageView: PageView) : |
|
|
|
val hasNext = pageView.pageFactory.hasNext() |
|
|
|
val hasNext = pageView.pageFactory.hasNext() |
|
|
|
if (!hasNext) { |
|
|
|
if (!hasNext) { |
|
|
|
if (!snackBar.isShown) { |
|
|
|
if (!snackBar.isShown) { |
|
|
|
snackBar.setText("没有下一页") |
|
|
|
snackBar.setText(R.string.no_next_page) |
|
|
|
snackBar.show() |
|
|
|
snackBar.show() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|