GithubHelp home page GithubHelp logo

duytient31 / android-paging-library-mvvm-retrofit-sampl-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from th41cave/android-paging-library-mvvm-retrofit-sampl-app

0.0 1.0 0.0 154 KB

an app that displays a list of the movies on theater fetched from the TMDB API using Retrofit, all implemented using the new Android paging library (Alpha release) and LiveData-ViewModel architecture components

Java 100.00%

android-paging-library-mvvm-retrofit-sampl-app's Introduction

DasFilm

DasFilm is a Android Paging library sample app that shows the current movies in theater using the Movie database API. Moreover this DasFilm holds an example of:

 * Android Architecture Components (ViewModel and LiveData)
 * Rest API calls using Retrofit libray 
 * Building Android Costum Views 
 * Facebook shimmer Library 

Android Paging library

The paging library makes it easier for your app to gradually load information as needed from a data source, without overloading the device or waiting too long for a big database query. Many apps work with large sets of data, but only need to load and display a small portion of that data at any time. An app might have thousands of items that it could potentially display, but it might only need access to a few dozen of them at once. If the app isn't careful, it can end up requesting data it doesn't actually need, placing a performance burden on the device and the network. If the data is stored or synchronized with a remote database, this can also slow the app and waste the user's data plan.

How it works ?

Together, the components of the Paging Library organize a data flow from a background thread producer, and presentation on the UI thread. For example, when a new item is inserted in your database, the DataSource is invalidated, and the LiveData or Flowable produces a new PagedList on a background thread.

That newly-created PagedList is sent to the PagedListAdapter on the UI thread. The PagedListAdapter then uses DiffUtil on a background thread to compute the difference between the current list and the new list. When the comparison is finished, the PagedListAdapter uses the list difference information to make appropriate call to RecyclerView.Adapter.notifyItemInserted() to signal that a new item was inserted. The RecyclerView on the UI thread then knows that it only has to bind a single new item, and animate it appearing on screen.

One of the best talks that can introduce you to this new awsome library is the one of Florina Muntenescu at GDDEurop 2017...link to the video

android-paging-library-mvvm-retrofit-sampl-app's People

Watchers

 avatar

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.