mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
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:
parent
8986de3db4
commit
183f28b382
1 changed files with 5 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue