pull/36/head
kunfei 5 years ago
parent fa933273d9
commit 0104a541e0
  1. 6
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  2. 14
      app/src/main/res/layout-land/activity_book_info.xml
  3. 14
      app/src/main/res/layout/activity_book_info.xml

@ -204,8 +204,10 @@ class BookInfoActivity : VMBaseActivity<BookInfoViewModel>(R.layout.activity_boo
} }
} }
iv_chapter_top.onClick { iv_chapter_top.onClick {
adapter.reorder = !adapter.reorder rv_chapter_list.scrollToPosition(0)
adapter.notifyDataSetChanged() }
iv_chapter_bottom.onClick {
rv_chapter_list.scrollToPosition(adapter.itemCount - 1)
} }
} }

@ -245,11 +245,21 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/go_to_top" android:contentDescription="@string/go_to_top"
android:padding="10dp" android:src="@drawable/ic_arrow_drop_up"
android:src="@drawable/ic_exchange_order"
android:tooltipText="@string/go_to_top" android:tooltipText="@string/go_to_top"
app:tint="@color/tv_text_default" app:tint="@color/tv_text_default"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_chapter_bottom"
android:layout_width="36dp"
android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/go_to_bottom"
android:src="@drawable/ic_arrow_drop_down"
android:tooltipText="@string/go_to_bottom"
app:tint="@color/tv_text_default"
tools:ignore="UnusedAttribute" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

@ -237,11 +237,21 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackgroundBorderless" android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/go_to_top" android:contentDescription="@string/go_to_top"
android:padding="10dp" android:src="@drawable/ic_arrow_drop_up"
android:src="@drawable/ic_exchange_order"
android:tooltipText="@string/go_to_top" android:tooltipText="@string/go_to_top"
app:tint="@color/tv_text_default" app:tint="@color/tv_text_default"
tools:ignore="UnusedAttribute" /> tools:ignore="UnusedAttribute" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_chapter_bottom"
android:layout_width="36dp"
android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/go_to_bottom"
android:src="@drawable/ic_arrow_drop_down"
android:tooltipText="@string/go_to_bottom"
app:tint="@color/tv_text_default"
tools:ignore="UnusedAttribute" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

Loading…
Cancel
Save