Fix toolbar elevation issues with theme switching

This commit is contained in:
Jays2Kings 2021-04-29 00:08:13 -04:00
parent f5aafebc91
commit 44c2337e3d
2 changed files with 5 additions and 0 deletions

View File

@ -191,6 +191,7 @@ class RecentsController(bundle: Bundle? = null) :
binding.shadow2.alpha = if (isCollapsed) 0.25f else 0f
binding.shadow.alpha = if (isCollapsed) 0.5f else 0f
binding.fakeAppBar.alpha = if (isExpanded) 1f else 0f
updateTitleAndMenu()
}
if (presenter.recentItems.isNotEmpty()) {

View File

@ -322,6 +322,10 @@ fun Controller.scrollViewWith(
}
)
elevateFunc(recycler.canScrollVertically(-1))
recycler.post {
elevateFunc(recycler.canScrollVertically(-1))
}
recycler.addOnScrollListener(
object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {