fix: add padding to last item in recycler (#293)
* fix: add padding to last item in recycler Stop guessing numbers to compensate for a view we can measure. by adding a method to measure them. * fix: avoid scrolling artifacts in nested
This commit is contained in:
parent
19b5b11b07
commit
77c57846ed
10 changed files with 47 additions and 8 deletions
|
@ -18,6 +18,7 @@ import ani.dantotsu.connections.anilist.api.Activity
|
|||
import ani.dantotsu.databinding.FragmentFeedBinding
|
||||
import ani.dantotsu.media.MediaDetailsActivity
|
||||
import ani.dantotsu.profile.ProfileActivity
|
||||
import ani.dantotsu.setBaseline
|
||||
import ani.dantotsu.snackString
|
||||
import ani.dantotsu.util.Logger
|
||||
import com.xwray.groupie.GroupieAdapter
|
||||
|
@ -48,6 +49,9 @@ class FeedFragment : Fragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
activity = requireActivity()
|
||||
|
||||
binding.listRecyclerView.setBaseline((activity as ProfileActivity).navBar)
|
||||
|
||||
binding.listRecyclerView.adapter = adapter
|
||||
binding.listRecyclerView.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
|
@ -63,6 +67,7 @@ class FeedFragment : Fragment() {
|
|||
super.onResume()
|
||||
if (this::binding.isInitialized) {
|
||||
binding.root.requestLayout()
|
||||
binding.listRecyclerView.setBaseline((activity as ProfileActivity).navBar)
|
||||
if (!loadedFirstTime) {
|
||||
activity.lifecycleScope.launch(Dispatchers.IO) {
|
||||
val nulledId = if (activityId == -1) null else activityId
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue