Skip to content

Commit

Permalink
Shrink the FAB instead of hiding it
Browse files Browse the repository at this point in the history
  • Loading branch information
0nko committed Jan 15, 2025
1 parent 0d909ec commit 67aa25e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ class TabSwitcherActivity : DuckDuckGoActivity(), TabSwitcherListener, Coroutine
object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
if (dy > 0 || dy < 0 && tabsFab.isShown()) {
tabsFab.hide()
if (dy < 0) {
tabsFab.shrink()
}
}

override fun onScrollStateChanged(recyclerView: RecyclerView, newState: Int) {
if (newState == RecyclerView.SCROLL_STATE_IDLE) {
tabsFab.show()
tabsFab.extend()
}
super.onScrollStateChanged(recyclerView, newState)
}
Expand Down

0 comments on commit 67aa25e

Please sign in to comment.