From 0104a541e021e208f638aaccc58dd58930967745 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 29 Sep 2019 09:47:44 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/book/info/BookInfoActivity.kt | 6 ++++-- .../main/res/layout-land/activity_book_info.xml | 14 ++++++++++++-- app/src/main/res/layout/activity_book_info.xml | 14 ++++++++++++-- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt index 62bc33ca9..8905a248c 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt @@ -204,8 +204,10 @@ class BookInfoActivity : VMBaseActivity(R.layout.activity_boo } } iv_chapter_top.onClick { - adapter.reorder = !adapter.reorder - adapter.notifyDataSetChanged() + rv_chapter_list.scrollToPosition(0) + } + iv_chapter_bottom.onClick { + rv_chapter_list.scrollToPosition(adapter.itemCount - 1) } } diff --git a/app/src/main/res/layout-land/activity_book_info.xml b/app/src/main/res/layout-land/activity_book_info.xml index a5419f1e6..efc24a7a4 100644 --- a/app/src/main/res/layout-land/activity_book_info.xml +++ b/app/src/main/res/layout-land/activity_book_info.xml @@ -245,11 +245,21 @@ android:layout_height="match_parent" android:background="?android:attr/selectableItemBackgroundBorderless" android:contentDescription="@string/go_to_top" - android:padding="10dp" - android:src="@drawable/ic_exchange_order" + android:src="@drawable/ic_arrow_drop_up" android:tooltipText="@string/go_to_top" app:tint="@color/tv_text_default" tools:ignore="UnusedAttribute" /> + + diff --git a/app/src/main/res/layout/activity_book_info.xml b/app/src/main/res/layout/activity_book_info.xml index 2ccef7e17..b5981556c 100644 --- a/app/src/main/res/layout/activity_book_info.xml +++ b/app/src/main/res/layout/activity_book_info.xml @@ -237,11 +237,21 @@ android:layout_height="match_parent" android:background="?android:attr/selectableItemBackgroundBorderless" android:contentDescription="@string/go_to_top" - android:padding="10dp" - android:src="@drawable/ic_exchange_order" + android:src="@drawable/ic_arrow_drop_up" android:tooltipText="@string/go_to_top" app:tint="@color/tv_text_default" tools:ignore="UnusedAttribute" /> + +