Giter Site home page Giter Site logo

sheraz-nadeem / listgithubrepos Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 3.0 333 KB

Android app based on Architecture components(LiveData, PagedList, Room), Dagger 2, Retrofit 2, Kotlin & Kotlin Coroutines

License: Apache License 2.0

Kotlin 100.00%
kotlin-coroutines mvvm-pattern android-clean-architecture dagger2-mvvm dagger2 retrofit2 pagedlist pagedlistadapter room-persistence-library livedata android-clean-architecture-kotlin room-database architecture-components android

listgithubrepos's Introduction

List GitHub Repos using Paging Library

This application is created to show how paging library can be used to load infinite lists and used in conjunction with Network fetch & Room Database.

Tech Stack Used

  1. Android Architecture Components (Room Database, LiveData, Paging Library(PagedList, PagedListAdapter)).
  2. Application Architecture is MVVM.
  3. Networking using Retrofit 2.
  4. Used Kotlin.
  5. Used Kotlin Coroutines for Async Operations.
  6. Used Retrofit 2 Adapter for Kotlin Coroutine's Deferred type.
  7. Whole project is based on AndroidX.
  8. Used Dagger 2 for Dependency Injection.
  9. Picasso for Image handling.

Steps

  1. Request the GitHub API to show public repositories and parse the JSON response.
  2. Display a list of repositories, each entry shows
    • full repo name
    • description
    • login of the owner
    • forked or not
    • repo owner's avatar image
  3. Requesting 15 repos at a time over the netwokr. Using an endless list with a load more mechanism. The load more is triggered when the scrolling is 5-items near to reaching the end of the list.
  4. Cache the repos in room database storage.
  5. Show a light green background if the fork flag is false or missing, a white one otherwise.
  6. On a long click on a list item showing a bottom sheet to ask user if go to repository html_url or owner html_url which is then opened in the browser.

TODOs

  • Implement a mechanism to download and store the repos on a regular interval also if the app is closed.

listgithubrepos's People

Contributors

sheraz-nadeem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

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.