Paging 3 Android Tutorial | Infinite Scrolling Android Tutorial - CheezyCode | Hindi

preview_player
Показать описание
Android Paging 3 Tutorial in Hindi - Learn Paging 3 in Android with simple example. In this video, we will learn about paging in android. This tutorial covers step by step on how to implement pagination in android. Learn what is Paging Source, what is Pager and Paging Adapter.

We will be calling an API that supports pagination and use it to implement infinite Scroll in Android. Paging Source defines the way to load data from network i.e. API. Once you have paging source setup - you can define a pager object that is used to define the configuration such as pageSize, maxSize. Paging Adapter is used to show this paging data inside recyclerview.

Pagination improves performance of the app by creating only required objects. Recycler view recycles view whereas pagination library creates only the required objects in the memory. Paging 3 Jetpack Component provides support to implement paging in Android. We have implemented it using HILT and MVVM Architecture Pattern. Learn by creating a simple example in Hindi.

Topics covered -
1. What is Paging?
2. What is Paging Source, Pager, Paging Config, Paging Adapter?
3. Paging Implementation Example
4. MVVM + HILT + Paging 3 Jetpack Component.

Complete Dependency Injection Playlist Link -

Complete Android Architecture Components Playlist -

Beginner series in Android Playlist (Hindi) -

Kotlin Beginners Tutorial Series -

For more info - visit the below link

API Used -

Source Code -

We are social. Follow us at -
Рекомендации по теме
Комментарии
Автор

Best tutorial I ever watched. Thank you

aashutoshrimal
Автор

You are doing a amazing job. I would like to sincerely thank you for making such professional level videos and sharing it here. I am following you and my concepts are getting clear. Would love to get a reply on my comment and also would like to connect as well. Thanks again👏

shailysahoo
Автор

Thank you for the amazing explanation.
Can we use paging 3 with Firestore data, if yes then how

yonija
Автор

Such an amazing content. Keep posting more videos!

Rm
Автор

Simply superb explanation on Paging! Thanks a lot

devskhobragade
Автор

Thank you sir, i learned lots of things from you videos and got a good job on Android developer with more than 4LPA

luxurylifestyle
Автор

Thanks for this video, I have few questions & I sent an email to you.
First of all, as per your codes, it is showing errors & build failed.. I am trying to get data from SQLite instead of APIs.

UbedThaheem
Автор

I think there is a logical issue in getRefreshKey() fun. First time this function will return null. Then the position of the page will be 1 and it's prevKey will be null and nextKey will be 2 as per the logic in fun load(). Again there will be callback to function getRefreshKey(). As per the logic in this function you minus 1 from the nextKey and it will become 1 and this value i will be used as a position in function load and this fuction will again request for the same page which we have already loaded. Correct me if I am wrong. you can check by this by debugging or dry run.

RahulYadav-vswd
Автор

fun getRefeshKey() always return 1 as per the logic inside it. So the fun load() will always load page 1. I have performed dry run. Pls Clear my doubt if I am wrong.

RahulYadav-vswd
Автор

ye getRefreshKey() function jo h ismey kiya anchor position mee plus 1 ya minus 1 hota h ya phir prevKey ya nextKey mee se plus ya minus karkey return hota h value. Agar anchor position mee plus 1 ya minus 1 hota h tab tu iss function ka logic sahi h hamey desired page milta nahi tu same page milega jo anchor position hold karta h.

RahulYadav-vswd
Автор

Can you please make video on gradle
sometimes its confusing in gradle setup or what version of java we should use in project and which gradle version to be set

hardikkoladiya
Автор

What if I want to pass other params as well with PageNo in the API call for eg SearckKey, How can I pass?

yonija
Автор

♥♥♥♥♥♥ sir, live data ki jaga py flow kesy use hoga, main activity me ???? QuoteRepository me to thek ha .flow lag jye ga but ? main Activity me kesy use krein

mahboobforever
Автор

Does this work with different types of viewhholders ?

suhasbachewar
Автор

Sir, how can we implement this using flow? and how can we notify in paging data adapter using flow?

DushyantGangwal
Автор

You are great ❤️ i have learned lot of from your channel. ❤️

rushikeshthak
Автор

sir can you provide all your ppts for the revision and refrence

devgupta
Автор

Please sir implement this project using Java code. It will help more people.

mukeshroy
Автор

In this example if I scroll up. Will this code work?

RahulYadav-vswd
Автор

Hello sir, hope you will read this comment.
I want to implement pagination for firebase's real-time database. Basically, I want to fetch a single model from the database and show it in viewpager2, after that when the user will scroll the screen it should fetch the model again from the database. After searching for 4 days on the internet, I am posting this comment in the hope that you can help me.
Questions->
1. we fetch data from the cloud in the repository class and here we are also calling PagingSource class from the repository, I can not imagining the flow of code.
2. What will be the key for LoadResult<?, Room>.
3. How to do it without DI.

apunichjohncena
welcome to shbcf.ru