Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll listner is not working #5

Closed
megaacheyounes opened this issue Oct 25, 2020 · 1 comment
Closed

Scroll listner is not working #5

megaacheyounes opened this issue Oct 25, 2020 · 1 comment

Comments

@megaacheyounes
Copy link

Describe the bug
when registering a scroll listener (endless scroll listener part of this library: https://github.com/mikepenz/FastAdapter), it does not receive the events, when changing ShimmerRecyclerView to android RecyclerView (changed only in layout file, code is always same), it works fine.

To Reproduce
Steps to reproduce the behavior:
by Using EndlessRecyclerOnScrollListener of FasterAdapter (https://github.com/mikepenz/FastAdapter)

       //...
        appsAdapter = ItemAdapter() 
        fastAdapter = FastAdapter.with(appsAdapter)
  
        footerAdapter = items()

        val endlessRecyclerOnScrollListener =
            object : EndlessRecyclerOnScrollListener(footerAdapter) {
                override fun onLoadMore(currentPage: Int) {
                   Timber.d("load more items")
                   //....
                }
            }
 
        binding.recyclerView.apply {
            layoutManager =    LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
            adapter = fastAdapter 
            addOnScrollListener(endlessRecyclerOnScrollListener) 
        }

Expected behavior
The onLoadMore function of EndlessRecyclerOnScrollListener should be called when scrolling the bottom of recycler view

Smartphone :
Android api 29

@megaacheyounes
Copy link
Author

the issue is not related to ShimmerRecyclerView, its related to EndlessRecyclerOnScrollListener, I have to manually reset its inner variables after refreshing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant