Fixed AppBarLayout issues
This commit is contained in:
parent
cb8ef7f32c
commit
efeacfa622
7 changed files with 14 additions and 16 deletions
|
@ -64,9 +64,6 @@ abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : Recycle
|
|||
initAdapter()
|
||||
setUpRecyclerView()
|
||||
setupToolbar()
|
||||
binding.appBarLayout.statusBarForeground =
|
||||
MaterialShapeDrawable.createWithElevationOverlay(requireContext())
|
||||
|
||||
// Add listeners when shuffle is visible
|
||||
if (isShuffleVisible) {
|
||||
binding.recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||
|
@ -95,7 +92,6 @@ abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : Recycle
|
|||
bottomMargin = it
|
||||
}
|
||||
})
|
||||
binding.appBarLayout.drawNextToNavbar()
|
||||
}
|
||||
|
||||
open fun onShuffleClicked() {
|
||||
|
@ -117,6 +113,9 @@ abstract class AbsRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : Recycle
|
|||
}
|
||||
val appName = resources.getString(titleRes)
|
||||
binding.appNameText.text = appName
|
||||
binding.toolbarContainer.drawNextToNavbar()
|
||||
binding.appBarLayout.statusBarForeground =
|
||||
MaterialShapeDrawable.createWithElevationOverlay(requireContext())
|
||||
}
|
||||
|
||||
abstract val titleRes: Int
|
||||
|
|
|
@ -124,7 +124,7 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
|
|||
}
|
||||
}
|
||||
})
|
||||
binding.appBarLayout.drawNextToNavbar()
|
||||
binding.toolbarContainer.drawNextToNavbar()
|
||||
}
|
||||
|
||||
private fun setUpTitle() {
|
||||
|
|
|
@ -76,7 +76,7 @@ class HomeFragment :
|
|||
view.doOnPreDraw { startPostponedEnterTransition() }
|
||||
binding.appBarLayout.statusBarForeground =
|
||||
MaterialShapeDrawable.createWithElevationOverlay(requireContext())
|
||||
binding.appBarLayout.drawNextToNavbar()
|
||||
binding.toolbar.drawNextToNavbar()
|
||||
}
|
||||
|
||||
private fun setupListeners() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue