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

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

Комментарии • 73

  • @konfinoyair
    @konfinoyair 6 лет назад +12

    We got it. Another library.

  • @diegobarle9578
    @diegobarle9578 4 года назад +2

    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?

    • @Tipsy92
      @Tipsy92 4 года назад

      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

  • @SuperCorleone17
    @SuperCorleone17 6 лет назад +15

    Why they were using asyncTasks for everything (tutorials, samples, etc) and now I am seeing executors everywhere?

    • @AhmedAli-jx9ie
      @AhmedAli-jx9ie 6 лет назад

      I agree
      I only heard about executors from github samples, now I am using them also

    • @anasabubakar4125
      @anasabubakar4125 4 года назад

      AsyncTask class is deprecated

  • @pardeepsharma6502
    @pardeepsharma6502 6 лет назад +14

    It would be nice if we have something like NetworkBoundResource for BoundaryCallback. I mean a generic Java code sample. :)

  • @medosaad98
    @medosaad98 3 года назад +1

    It's call library, but I searched for Paging in Firebase Queries but unfortunately nothing :(

  • @hoc100995
    @hoc100995 6 лет назад +4

    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 лет назад +1

      why do someone need recyclerview inside nestedscrollview

    • @scottbiggs8894
      @scottbiggs8894 6 лет назад +2

      @@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?

  • @mohsenteymouri5426
    @mohsenteymouri5426 3 года назад

    Thanks to Dev team.

  • @sambocrockett
    @sambocrockett 6 лет назад +42

    No java examples lead me to believe that google plans on letting java die out eventually.

    • @dhaneshshastri1
      @dhaneshshastri1 5 лет назад +7

      Future is Kotlin :)

    • @JonathanAste
      @JonathanAste 5 лет назад

      you can be sure xD

    • @abdullahcelik7416
      @abdullahcelik7416 5 лет назад

      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.

  • @adil-hussain-84
    @adil-hussain-84 6 лет назад +10

    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 5 лет назад

      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.

  • @Zhuinden
    @Zhuinden 6 лет назад +4

    Oooh 11:50 RxPagedListBuilder that is cool

  • @ururunstrive
    @ururunstrive 6 лет назад

    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!

  • @shmehdi01
    @shmehdi01 4 года назад +1

    If any one know how to do operations like remove/add in paged list and update recyclerview... reply

  • @santanusur1265
    @santanusur1265 6 лет назад +19

    Any github example would be great...

    • @JastVacaty
      @JastVacaty 6 лет назад +2

      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 лет назад +1

      github.com/googlesamples/android-architecture-components/tree/master/PagingWithNetworkSample

    • @hdralexandru
      @hdralexandru 5 лет назад +1

      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

  • @yogeshkurane123
    @yogeshkurane123 6 лет назад +5

    Is this all even possible in Java to begin with?

  • @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...

  • @RS-kt6is
    @RS-kt6is 6 лет назад +42

    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 лет назад +5

      man its dose not matter if you listen or not, you need them they don't need u

    • @czs1984
      @czs1984 6 лет назад +9

      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 лет назад +23

      once you learn Kotlin, you will regret saying that, trust me

    • @revedko
      @revedko 6 лет назад +1

      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 6 лет назад

      @@FabienHerman Say what? !!!

  • @kaelhawker6021
    @kaelhawker6021 4 года назад +1

    I'm so sad there is no java example for beginners :(

  •  5 лет назад

    Someone have an example that shows placeholders?

  • @toolazytothinkofanusername7949
    @toolazytothinkofanusername7949 3 года назад +1

    I'd rather make custom pagination whenever user scrolls to bottom.

  • @witoldsienski1709
    @witoldsienski1709 6 лет назад

    Important and great talk :) !

  • @hotmule
    @hotmule 5 лет назад +1

    Thank you google, very cool 👍

  • @shirshzibbu330
    @shirshzibbu330 4 года назад

    31:37 blog post url: goo.gl/rBQFvS

  • @xpopcornx1747
    @xpopcornx1747 5 лет назад +1

    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.

  • @rahulh6711
    @rahulh6711 4 года назад

    Why its so complicated?

  • @nawshadhamid
    @nawshadhamid 6 лет назад +3

    Why not java example?

    • @ShayanSabahi
      @ShayanSabahi 6 лет назад +2

      good question TBH. i myself havent found any reason to migrate to kotlin

    • @codyliu2853
      @codyliu2853 6 лет назад +4

      Koltin is the future.

    • @nawshadhamid
      @nawshadhamid 6 лет назад +3

      Cody Liu
      You are wrong.
      Koltin is the present.

  • @DannTeBg
    @DannTeBg 5 лет назад +3

    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?

  • @PeiyongYang
    @PeiyongYang 6 лет назад

    Can I download the PPT or keynote file?

  • @seddikfredj2365
    @seddikfredj2365 6 лет назад

    Any java example ?

  • @scottbiggs8894
    @scottbiggs8894 6 лет назад +2

    I can barely understand this guy. So he must be smart!

    • @llothar68
      @llothar68 2 года назад

      You don't need to understand.most important is that Google shows how diverse their engineers are

  • @mrezao_o6653
    @mrezao_o6653 6 лет назад

    That thick turky accent =))

    • @RS-kt6is
      @RS-kt6is 6 лет назад

      putin carving turkey for dinner.

  • @yeilmusic
    @yeilmusic 5 лет назад

    horrible , ios win simple is better

    • @llothar68
      @llothar68 2 года назад

      Google software is always terrible over engineered. Thats the typical result when you hire only the smartest people on the market