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 Introduction
countries's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.