pull/32/head
kunfei 5 years ago
parent 669d50b98c
commit f83898320a
  1. 4
      app/src/main/java/io/legado/app/ui/widget/recycler/scroller/FastScroller.kt
  2. 6
      app/src/main/res/layout/view_fastscroller.xml

@ -103,9 +103,7 @@ class FastScroller : LinearLayout {
@IdRes val recyclerViewId = mRecyclerView?.id ?: View.NO_ID @IdRes val recyclerViewId = mRecyclerView?.id ?: View.NO_ID
val marginTop = resources.getDimensionPixelSize(R.dimen.fastscroll_scrollbar_margin_top) val marginTop = resources.getDimensionPixelSize(R.dimen.fastscroll_scrollbar_margin_top)
val marginBottom = resources.getDimensionPixelSize(R.dimen.fastscroll_scrollbar_margin_bottom) val marginBottom = resources.getDimensionPixelSize(R.dimen.fastscroll_scrollbar_margin_bottom)
if (recyclerViewId == View.NO_ID) { require(recyclerViewId != View.NO_ID) { "RecyclerView must have a view ID" }
throw IllegalArgumentException("RecyclerView must have a view ID")
}
when (viewGroup) { when (viewGroup) {
is ConstraintLayout -> { is ConstraintLayout -> {
val constraintSet = ConstraintSet() val constraintSet = ConstraintSet()

@ -21,10 +21,6 @@
android:id="@+id/fastscroll_scrollbar" android:id="@+id/fastscroll_scrollbar"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:paddingEnd="@dimen/fastscroll_scrollbar_padding_end"
android:paddingLeft="@dimen/fastscroll_scrollbar_padding_start"
android:paddingRight="@dimen/fastscroll_scrollbar_padding_end"
android:paddingStart="@dimen/fastscroll_scrollbar_padding_start"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
@ -41,6 +37,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:paddingEnd="@dimen/fastscroll_scrollbar_padding_end"
android:paddingStart="@dimen/fastscroll_scrollbar_padding_start"
tools:ignore="ContentDescription" tools:ignore="ContentDescription"
tools:src="@drawable/fastscroll_handle" /> tools:src="@drawable/fastscroll_handle" />

Loading…
Cancel
Save