All Projects → rafaelcrz → Android_scroll_endless

rafaelcrz / Android_scroll_endless

Scroll endless for Android recyclerview

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android scroll endless

Recyclerview Fastscroller
A fully customizable Fast Scroller for the RecyclerView in Android, written in Kotlin
Stars: ✭ 585 (+4775%)
Mutual labels:  recyclerview, scroll, scrolling
Infinitescroll
Infinite Scroll (Endless Scrolling) for RecyclerView in Android
Stars: ✭ 183 (+1425%)
Mutual labels:  recyclerview, scroll, scrolling
volx-recyclerview-fast-scroll
An easy to use implementation for fast scroll recyclerview
Stars: ✭ 34 (+183.33%)
Mutual labels:  recyclerview, scrolling, scroll
Phytouch
Smooth scrolling, rotation, pull to refresh, page transition and any motion for the web - 丝般顺滑的触摸运动方案
Stars: ✭ 2,854 (+23683.33%)
Mutual labels:  scroll, scrolling
react-recycled-scrolling
Simulate normal scrolling by using only fixed number of DOM elements for large lists of items with React Hooks
Stars: ✭ 26 (+116.67%)
Mutual labels:  recyclerview, scrolling
srraf
Monitor scrolling and resizing without event listeners.
Stars: ✭ 26 (+116.67%)
Mutual labels:  scrolling, scroll
RvClickListenerExample
Example showing the implementation of onItemClickListener & getAdapterPosition() in RecyclerView.
Stars: ✭ 22 (+83.33%)
Mutual labels:  recyclerview, android-application
Android Extensions
An Android library with modules to quickly bootstrap an Android application.
Stars: ✭ 356 (+2866.67%)
Mutual labels:  android-application, recyclerview
Ngx Scroll To
Scroll to any element to enhance scroll-based features in you app. Works for Angular 4+, both AoT and SSR. No dependencies.
Stars: ✭ 269 (+2141.67%)
Mutual labels:  scroll, scrolling
Fuckmyscroll.js
🔮 Animated scrolling to certain point or anchor
Stars: ✭ 10 (-16.67%)
Mutual labels:  scroll, scrolling
React Scrolllock
🔒 Prevent scroll on the <body />
Stars: ✭ 393 (+3175%)
Mutual labels:  scroll, scrolling
Recycler Fast Scroll
Provides fast scroll and section idexer for recycler view
Stars: ✭ 445 (+3608.33%)
Mutual labels:  recyclerview, scrolling
CarouselGifViewer
Efficiently display a list of GIFs in a carousel (RecyclerView).
Stars: ✭ 33 (+175%)
Mutual labels:  recyclerview, android-application
scrollparent.js
A function to get the scrolling parent of an html element.
Stars: ✭ 51 (+325%)
Mutual labels:  scrolling, scroll
ClockScroller
A cool animated RecyclerView clock face scroller handle inspired by the following MaterialUp submission - https://material.uplabs.com/posts/codepen-scrolling-clock
Stars: ✭ 75 (+525%)
Mutual labels:  recyclerview, scroll
Jump.js
A modern smooth scrolling library.
Stars: ✭ 3,459 (+28725%)
Mutual labels:  scroll, scrolling
Scrolldir
0 dependency JS plugin to leverage scroll direction with CSS ⬆⬇ 🔌💉
Stars: ✭ 679 (+5558.33%)
Mutual labels:  scroll, scrolling
EasyScrollDots
Single page scroll JavaScript plugin that allows for vertical navigation of page sections
Stars: ✭ 38 (+216.67%)
Mutual labels:  scrolling, scroll
use-scroll-direction
A simple, performant, and cross-browser hook for detecting scroll direction in your next react app.
Stars: ✭ 24 (+100%)
Mutual labels:  scrolling, scroll
Mac Mouse Fix
Mac Mouse Fix - A simple way to make your mouse better.
Stars: ✭ 362 (+2916.67%)
Mutual labels:  scroll, scrolling

Android Endless Scroll

Android Arsenal

This project is a EndlessScroll for using on RecyclerView

Preview

The ProgressDialog is optional

Sample

This project has a sample

Activity sample using Endless

Integrating into your project

This project is available in JitPack.io repository.

Add into build.gradle

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

Add into app/build.gradle

dependencies {
  compile 'com.github.rafaelcrz:android_scroll_endless:master-SNAPSHOT'
}

Usage

Endeles Scroll

  • Configure the RecyclerView with the Adapter and LayoutManager before use the ScrollEndeless
recyclerView.setAdapter(adapter);
recyclerView.setLayoutManager(layoutManager);
  • Declare ScrollEndless like this
endless = new ScrollEndless(mContext, recyclerView, layoutManager);
  • Set the total page. Default is 1 The total pages value you can get it from your response, setting in a global variable.
endless.setTotalPage(total);
  • This is importante. Make your requestCall before get the EndlessListener. For popule the adapter.
yourRequestCall();
  • Get the ScrollEndless listener.
endless.addScrollEndless(new ScrollEndless.EndlessScrollListener() {
    @Override
    public void onLoadMore() {
        //Get the next page when is available
        yourRequestMethod();
    }

    @Override
    public void onLoadAllFinish() {
        //Is the last page. Load all itens
    }
});
  • In your requestMetohd, is very important set the following methods. In your requestMethod, before 'response', use it: The ScrollEndless needs know when the request is executing.
endless.isLoading(true);

If you want, use it for show a simple ProgressDialog

endless.showProgressDialog("title", "message", cancelable: boolean); 

For close it, use

endless.closeProgressDialog() 

In the onResponse or when the data item are complete in adapter

endless.isLoading(false); 

If you want, use it for close the ProgressDialog

endless.closeProgressDialog(); 

Set the next Page (before the increment)

endless.setPage(page);

Increment the page

page = endless.getPage() + 1;

ScrollManagerDirection

Use it for manage the Scroll direction and do something when scroll up / scroll down. For example, show or hide a FloatButton

        //Recyclerview down/up
        endless.addScrollManagerDirection(new ScrollEndless.ScrollManagerDirectionListener() {
            @Override
            public void onScrollUp() {
                //do something
                floatingActionButton.hide();
                floatingActionButton.animate();
            }

            @Override
            public void onScrollDown() {
                //do something
                floatingActionButton.show();
                floatingActionButton.animate();
            }
        });
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].