scroll to top padding fixed

This commit is contained in:
aayush262 2024-01-26 09:29:12 +05:30
parent 29c6863b00
commit 0aa95889aa
2 changed files with 2 additions and 0 deletions

View file

@ -155,6 +155,7 @@ class AnimeWatchFragment : Fragment() {
val position = gridLayoutManager.findFirstVisibleItemPosition() val position = gridLayoutManager.findFirstVisibleItemPosition()
if (position > 2) { if (position > 2) {
binding.ScrollTop.translationY = -navBarHeight.toFloat()
binding.ScrollTop.visibility = View.VISIBLE binding.ScrollTop.visibility = View.VISIBLE
} else { } else {
binding.ScrollTop.visibility = View.GONE binding.ScrollTop.visibility = View.GONE

View file

@ -150,6 +150,7 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
val position = gridLayoutManager.findFirstVisibleItemPosition() val position = gridLayoutManager.findFirstVisibleItemPosition()
if (position > 2) { if (position > 2) {
binding.ScrollTop.translationY = -navBarHeight.toFloat()
binding.ScrollTop.visibility = View.VISIBLE binding.ScrollTop.visibility = View.VISIBLE
} else { } else {
binding.ScrollTop.visibility = View.GONE binding.ScrollTop.visibility = View.GONE