No video

Android Jetpack: Manage infinite lists with RecyclerView and Paging (Google I/O '18)

  Рет қаралды 80,233

Android Developers

Android Developers

Күн бұрын

An introduction to the Paging Library in Android Arch Components. This session will go through local (with Room library) and remote storage (with Retrofit) examples, explain the design, and how it fits together with other architecture components.
Rate this session by signing-in on the I/O website here → goo.gl/Up5Xsc
Watch more Android sessions from I/O '18 here → goo.gl/R9L42F
See all the sessions from Google I/O '18 here → goo.gl/q1Tr8x
Subscribe to the Android Developers channel → goo.gl/GEh1ds
#io18 event: Google I/O 2018; re_ty: Publish; product: Android - Jetpack; fullname: Yigit Boyar, Chris Craik; event: Google I/O 2018;

Пікірлер: 76
@SnoopyDoofie
@SnoopyDoofie 5 жыл бұрын
This was posted a year ago and I can confirm that Google has provided zero working examples showing how to do this in a real app. Their guide also has code that does not compile. Definitely one of the worst APIs released.
@hilmanshini_jigoku
@hilmanshini_jigoku 3 жыл бұрын
haha yeah
@Joske369
@Joske369 3 жыл бұрын
Also, in this video i feel like they ignore "keeping the data fresh", i have no clue on how to do that using the data layering technique
@konfinoyair
@konfinoyair 6 жыл бұрын
We got it. Another library.
@mohsenteymouri5426
@mohsenteymouri5426 3 жыл бұрын
Thanks to Dev team.
@witoldsienski1709
@witoldsienski1709 6 жыл бұрын
Important and great talk :) !
@pardeepsharma6502
@pardeepsharma6502 6 жыл бұрын
It would be nice if we have something like NetworkBoundResource for BoundaryCallback. I mean a generic Java code sample. :)
@Zhuinden
@Zhuinden 6 жыл бұрын
Oooh 11:50 RxPagedListBuilder that is cool
@ururunstrive
@ururunstrive 5 жыл бұрын
Hi guys, I'm wondering how do you invalidate small set of the datasource? For example, in the video Yigit says that, in a Contact List Application, contact that start with H to O has changed. How do ask the datasource, whether its Positional, ItemKeyed, or Paged data sources to load only at certain position? Any help will be appreciated, thanks!
@papcooffset
@papcooffset 5 жыл бұрын
In my application, I am invalidating the source whenever a new item is added to the database. But the PagedList jumps to the top of the list whenever I do so. Can anybody help please...
@SuperCorleone17
@SuperCorleone17 6 жыл бұрын
Why they were using asyncTasks for everything (tutorials, samples, etc) and now I am seeing executors everywhere?
@AhmedAli-jx9ie
@AhmedAli-jx9ie 5 жыл бұрын
I agree I only heard about executors from github samples, now I am using them also
@anasabubakar4125
@anasabubakar4125 4 жыл бұрын
AsyncTask class is deprecated
5 жыл бұрын
Someone have an example that shows placeholders?
@adil-hussain-84
@adil-hussain-84 6 жыл бұрын
I may be wrong but this library sounds non-trivial and sounds like it requires a real deep integration into the app which renders it super difficult in future to replace when the next shiny library is released. Tread with caution I guess... unless you're building an app which won't survive longer than a year.
@thecsciworker291
@thecsciworker291 4 жыл бұрын
It is non-trivial, but it is easy to replace. Lets say you're not using a viewmodel. So you have your app (recyclerview) and a datasource/dataprovider (whether local db or network). All you need is to create the LivePagedListBuilder, and a datasource class that adapts to your data provider(db/network). So you have two things in the middle. It's like a recycler view and an adapter to handle your list. Also, the problem isn't a new shiny thing. The problem is wanting to use every new shiny thing. If you have a solution that works the way you want it to, then no need to look at Paging library. My problem with the samples are, they are overly engineered. So it takes a while a strip out the important bits. But you learn some neat code along the way.
@yogeshkurane123
@yogeshkurane123 6 жыл бұрын
Is this all even possible in Java to begin with?
@diegobarle9578
@diegobarle9578 4 жыл бұрын
In the situation of Database + Network, you mention at 26:34 very briefly that to keep our data fresh, just whoever starts observing the stream of data simply start a new fetch. I have a list of movies and people can like movies, so the likes counter grows. What's the best solution to keep that counter updated considering that I'm also using this pagination library?
@Joske369
@Joske369 3 жыл бұрын
I'm asking myself the same thing, or what if some data at the backend has been deleted? I can't find anything online on this subject
@sambocrockett
@sambocrockett 6 жыл бұрын
No java examples lead me to believe that google plans on letting java die out eventually.
@dhaneshshastri1
@dhaneshshastri1 5 жыл бұрын
Future is Kotlin :)
@JonathanAste
@JonathanAste 5 жыл бұрын
you can be sure xD
@abdullahcelik7416
@abdullahcelik7416 4 жыл бұрын
I thought the same. But then I decided to learn kotlin because all the codelabs regarding the new fresh libraries are written in kotlin only...so decided to learn kotlin. I must admit that it is a very good language when it comes to develop Android Apps. So I would recommend to learn it.
@AlexGomes09
@AlexGomes09 4 жыл бұрын
there's no doubt on that. It was obvious when they made kotlin official
@ChauBacHo
@ChauBacHo 4 жыл бұрын
That is right. But it is very easy to learn Kotlin when you have Java background. And also give up Java is a very long story for every Android enterprise.
@shmehdi01
@shmehdi01 3 жыл бұрын
If any one know how to do operations like remove/add in paged list and update recyclerview... reply
@hoc100995
@hoc100995 6 жыл бұрын
Does it work with recycleview inside nestedscrollview ? If not then it end up with normal paging some where and new paging some where that look bad
@rahulprasad2311
@rahulprasad2311 6 жыл бұрын
why do someone need recyclerview inside nestedscrollview
@scottbiggs8894
@scottbiggs8894 5 жыл бұрын
@@rahulprasad2311 Why is irrelevant. Just answer the question.
@salmanhameed9495
@salmanhameed9495 5 жыл бұрын
@@rahulprasad2311 someone have multiple recyclerViews in an activity/fragment, all of them have horizontal orientation, but last one has vertical orientation, now I have to implement pagination on this recyclerview, so that we have to put all the recyclerviews in a nestedScrollView.
@PaoloValerdi
@PaoloValerdi 5 жыл бұрын
@@salmanhameed9495 Not the way to go, NestedScrollView will consume the vertical scroll and you'll end up with the vertical RecyclerView not recycling any view at all (horizontal RecyclerView will recycle actually). You have to check out Epoxy or another library to implements this sort of nested RecyclerView
@lamnguyenhoang4424
@lamnguyenhoang4424 5 жыл бұрын
@@salmanhameed9495 I've 2 RecyclerView contained in a NestedScrollView and using Paging Library with the last RecyclerView. However, the PageKeyedDataSource always calls loadAfter() method after I submit list to PagedListAdapter although I do not scroll the bottom RecyclerView. How can I resolve this bug?
@medosaad98
@medosaad98 3 жыл бұрын
It's call library, but I searched for Paging in Firebase Queries but unfortunately nothing :(
@hotmule
@hotmule 4 жыл бұрын
Thank you google, very cool 👍
@santanusur1265
@santanusur1265 6 жыл бұрын
Any github example would be great...
@JastVacaty
@JastVacaty 6 жыл бұрын
github.com/googlesamples/android-architecture-components/tree/master/PagingWithNetworkSample Probably you want this. and also you can see almost all Android architecture components example from here: github.com/googlesamples/android-architecture-components
@datouch
@datouch 6 жыл бұрын
github.com/googlesamples/android-architecture-components/tree/master/PagingWithNetworkSample
@hdralexandru
@hdralexandru 5 жыл бұрын
For whoever is interested in this, now there is also an exercise on codelab. codelabs.developers.google.com/codelabs/android-paging/index.html?index=..%2F..index#0
@kaelhawker6021
@kaelhawker6021 4 жыл бұрын
I'm so sad there is no java example for beginners :(
@PeiyongYang
@PeiyongYang 6 жыл бұрын
Can I download the PPT or keynote file?
@toolazytothinkofanusername7949
@toolazytothinkofanusername7949 3 жыл бұрын
I'd rather make custom pagination whenever user scrolls to bottom.
@seddikfredj2365
@seddikfredj2365 6 жыл бұрын
Any java example ?
@rahulh6711
@rahulh6711 3 жыл бұрын
Why its so complicated?
@xpopcornx1747
@xpopcornx1747 5 жыл бұрын
Isn't recyclerview supposed to cache and only load what is visible anyway, so what's the point of this.
@rokretar4319
@rokretar4319 5 жыл бұрын
Recycleview only creates viewholders that are on screen (well a bit more) but it still has the full list in cache. Here the list that list that recycleview stores in cache is smaller and not only the viewholder that are created.
@kaelhawker6021
@kaelhawker6021 4 жыл бұрын
exactly as Rok Retar said. RecyclerView still contains the whole chunk of the list. With this, I think, you are feeding the recyclerview the data that it needs to display. I think it is very useful when you are getting large data from the internet.
@ahmadullah.saikat
@ahmadullah.saikat 6 жыл бұрын
Why not java example?
@ShayanSabahi
@ShayanSabahi 6 жыл бұрын
good question TBH. i myself havent found any reason to migrate to kotlin
@codyliu2853
@codyliu2853 6 жыл бұрын
Koltin is the future.
@ahmadullah.saikat
@ahmadullah.saikat 6 жыл бұрын
Cody Liu You are wrong. Koltin is the present.
@scottbiggs8894
@scottbiggs8894 5 жыл бұрын
I can barely understand this guy. So he must be smart!
@llothar68
@llothar68 Жыл бұрын
You don't need to understand.most important is that Google shows how diverse their engineers are
@shirshzibbu330
@shirshzibbu330 3 жыл бұрын
31:37 blog post url: goo.gl/rBQFvS
@mrezao_o6653
@mrezao_o6653 6 жыл бұрын
That thick turky accent =))
@RS-kt6is
@RS-kt6is 6 жыл бұрын
putin carving turkey for dinner.
@RS-kt6is
@RS-kt6is 6 жыл бұрын
I'm honestly done with listening to these people. When they finish hacking and rehacking, implementing one language, then another, one API, then another....when they all agree and can write a book on Android, I'll listen. Honestly I can't keep up with all the tricks, magic, DSL they invent.
@Hamza-ny7rx
@Hamza-ny7rx 6 жыл бұрын
man its dose not matter if you listen or not, you need them they don't need u
@czs1984
@czs1984 6 жыл бұрын
Radu Savutiu me too. When they invent something, they are base on general case, even can suit 90% of use case, but unfortunately we developers are easily falling into the 10%. I am done with them too, I just want something simple and time saving, so I can focus on the business logic, testing, UI, performance, not a complex and bulky framework which I have to re-invest time on so-called “new” or “excited” things, so can be integrated into my own work which cost days...
@markbuikema7248
@markbuikema7248 6 жыл бұрын
once you learn Kotlin, you will regret saying that, trust me
@soarer_z30
@soarer_z30 5 жыл бұрын
You can create unmaintainable enterprise level apps using Java or whatever language. When you learning new stuff they always looks as a mess. Keep going.
@davidcurtismintah
@davidcurtismintah 5 жыл бұрын
@@FabienHerman Say what? !!!
@DannTeBg
@DannTeBg 4 жыл бұрын
To anyone planning to use this Library DON'T. Its absolute TRASH!. You cant even remove items from the list.
@DannTeBg
@DannTeBg 4 жыл бұрын
@manideep lanka i feel your pain
@aspix2k
@aspix2k 4 жыл бұрын
@@DannTeBg What do you mean by "you cant even remove items from the list"?
@kaelhawker6021
@kaelhawker6021 4 жыл бұрын
please follow up on "You cant even remove items from the lists". Why?
@yeilmusic
@yeilmusic 4 жыл бұрын
horrible , ios win simple is better
@llothar68
@llothar68 Жыл бұрын
Google software is always terrible over engineered. Thats the typical result when you hire only the smartest people on the market
Android Jetpack: How to smartly use fragments in your UI (Google I/O '18)
45:39
Effective ProGuard keep rules for smaller applications (Google I/O '18)
36:32
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 15 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 11 МЛН
Fun with LiveData (Android Dev Summit '18)
19:20
Android Developers
Рет қаралды 103 М.
Build a modular Android app architecture (Google I/O'19)
32:21
Android Developers
Рет қаралды 176 М.
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 12 М.
Let’s build a Native Library using Expo Modules
2:59:22
notJust․dev
Рет қаралды 13 М.
Kubernetes 101 workshop - complete hands-on
3:56:03
Kubesimplify
Рет қаралды 1,6 МЛН
Understanding Android memory usage (Google I/O '18)
39:05
Android Developers
Рет қаралды 66 М.
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 15 МЛН