From 08dfe25e2ff0951c26003adbcc8dac98374a2adb Mon Sep 17 00:00:00 2001 From: ca1e Date: Sat, 19 Oct 2019 18:24:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ui/widget/page/delegate/HorizontalPageDelegate.kt | 3 +++ app/src/main/res/drawable/ic_divider.xml | 2 +- app/src/main/res/layout/activity_main.xml | 1 + app/src/main/res/layout/fragment_my_config.xml | 2 +- app/src/main/res/layout/view_book_page.xml | 3 +++ app/src/main/res/layout/view_read_menu.xml | 5 +++-- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/page/delegate/HorizontalPageDelegate.kt b/app/src/main/java/io/legado/app/ui/widget/page/delegate/HorizontalPageDelegate.kt index 1f2b3fa42..1f0e377a2 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/delegate/HorizontalPageDelegate.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/delegate/HorizontalPageDelegate.kt @@ -3,6 +3,7 @@ package io.legado.app.ui.widget.page.delegate import android.view.MotionEvent import io.legado.app.ui.widget.page.PageView import io.legado.app.utils.screenshot +import io.legado.app.utils.snackbar import kotlin.math.abs abstract class HorizontalPageDelegate(pageView: PageView) : PageDelegate(pageView) { @@ -22,6 +23,7 @@ abstract class HorizontalPageDelegate(pageView: PageView) : PageDelegate(pageVie //如果上一页不存在 if (!hasPrev()) { noNext = true + pageView.snackbar("没有上一页") return true } //上一页截图 @@ -30,6 +32,7 @@ abstract class HorizontalPageDelegate(pageView: PageView) : PageDelegate(pageVie //如果不存在表示没有下一页了 if (!hasNext()) { noNext = true + pageView.snackbar("没有下一页") return true } //下一页截图 diff --git a/app/src/main/res/drawable/ic_divider.xml b/app/src/main/res/drawable/ic_divider.xml index 1ecb2d6d8..21a88f21a 100644 --- a/app/src/main/res/drawable/ic_divider.xml +++ b/app/src/main/res/drawable/ic_divider.xml @@ -2,5 +2,5 @@ - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 6b4eb4487..6795bf664 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -6,6 +6,7 @@ + app:title="@string/my" /> diff --git a/app/src/main/res/layout/view_read_menu.xml b/app/src/main/res/layout/view_read_menu.xml index 7ffd97ee2..9bba9e02d 100644 --- a/app/src/main/res/layout/view_read_menu.xml +++ b/app/src/main/res/layout/view_read_menu.xml @@ -148,7 +148,7 @@ + android:layout_height="120dp">