Hello dear android developers. In this article, I will tell you about Android load more data.. Load more data (Endless Scrolling) feature is very important for the user and the phone.. Let’s get to know this feature, also known as Android Paging, Pagination, Endless Scrolling and RecyclerView…
What is Android RecyclerView?
Android RecyclerView is an Android development feature that allows content to load as the page loads. Android paging is also called pagination and endless scrolling.
Why is Android Endless Scrolling Necessary?
Let’s consider a social media application, for example Facebook. How many seconds would it take to load if Facebook offered you all your friends’ posts, news, ads, and stories at the same time? I think it would take 1 to 5 minutes.
Not only your internet speed is important, but server speed and response time are also important.. Of course, if everyone wants all the data at the same time, things get complicated. Uncle Mark closes the shop Instead, it is more reasonable to give the desired data and the list as a limited number of packages.
Android Pagination How to use?
As every head can have a voice, I have a different opinion than everyone else on this subject.. Or rather, a different way from many uses.. Splitting the list into 20 parts and getting the next 20 parts at the bottom of the list.
First the RecyclerView library and designs.
- First of all Let’s open android studio.
- Create a new project. Of course, in kotlin language
- /build.gradle let’s change it as follows and synchronize it with the ‘sync now’ button. dependencies { implementation fileTree(dir: ‘libs’, include: [‘*.jar’]) implementation “org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version” implementation ‘androidx.appcompat:appcompat:1.1.0’ implementation ‘androidx.core:core-ktx:1.1.0’ implementation ‘androidx.constraintlayout:constraintlayout:1.1.3’ implementation ‘androidx.recyclerview:recyclerview:1.1.0’ }
- Now customized in order Let’s add our list elements. First your regular list element. Except for this loading situation, the list where we will show our normal data.(list_item_text_row.xml)