Code Monkey home page Code Monkey logo

countries's Introduction

countries

This project is build-able in Android studio. 

Retrofit is used to make the API calls to get the country data through the CountryDao 
and CountryService. The Country data class contains a model of the Country data.  There 
is a presenter (CountryContract.Presenter) and a view contract (CountryContract.View) 
that will post the Country data to a RecylerView using an adapter in the main activity
(CountryActivity) via an observer from the CountryViewModel. The CountryViewModel 
is used to persist the data obtained from the retrofit call. During configuration 
changes (such as an orientation change), the country data and location where the 
user scrolled to is maintained. 

A CountryCallBack is used to deal with both errors and successful responses. 
The callback is convenient in that onResponse() is fired on the main thread 
so as to not require an explicit change from the background thread to 
the main thread. 

Unit tests are provided for the CountryPresenter and retrofit CountryCallback. 

countries's People

Contributors

kishisaka 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.