Fast scroller on library now starts below the toolbar

Also adjust how far the hopper goes down to hide (so the snackbar has some elevation when it shows)
This commit is contained in:
Jay 2020-05-08 15:23:29 -04:00
parent 8986de3db4
commit 183f28b382

View file

@ -184,7 +184,7 @@ class LibraryController(
if (!recycler_cover.isClickable && isAnimatingHopper != true) {
category_hopper_frame.translationY += dy
category_hopper_frame.translationY =
category_hopper_frame.translationY.coerceIn(0f, 60f.dpToPx)
category_hopper_frame.translationY.coerceIn(0f, 50f.dpToPx)
up_category.alpha = if (isAtTop()) 0.25f else 1f
down_category.alpha = if (isAtBottom()) 0.25f else 1f
}
@ -218,7 +218,7 @@ class LibraryController(
) ?: 0
if (!recycler_cover.isClickable) {
category_hopper_frame.animate().translationY(
if (category_hopper_frame.translationY > 30f.dpToPx) 60f.dpToPx
if (category_hopper_frame.translationY > 25f.dpToPx) 50f.dpToPx
else 0f
).setDuration(shortAnimationDuration.toLong()).start()
}
@ -366,6 +366,9 @@ class LibraryController(
category_layout?.updateLayoutParams<ViewGroup.MarginLayoutParams> {
topMargin = recycler?.paddingTop ?: 0
}
fast_scroller?.updateLayoutParams<ViewGroup.MarginLayoutParams> {
topMargin = recycler?.paddingTop ?: 0
}
})
swipe_refresh.setOnRefreshListener {