Code Monkey home page Code Monkey logo

Comments (3)

hidroh avatar hidroh commented on May 30, 2024

The idea is to let RecyclerView signals you when you need to load data.

We first make a network call to v0/topstories.json to fetch all the IDs and create an array of items with no data and set it as data source for RecyclerView.Adapter.

Whenever RecyclerView needs to display an item it will trigger RecyclerView.Adapter.bindViewHolder(), at which point you make another network call to v0/item.json to fetch the item (if not yet), or bind from previously fetched item. You'll need to write logic to decide whether to fetch an item again.

from materialistic.

Chen-Sir avatar Chen-Sir commented on May 30, 2024

OK , thank you . I read the code again and understand it.

from materialistic.

hidroh avatar hidroh commented on May 30, 2024

Ok so I will close this issue.

from materialistic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.