Skip to content

IgnacioGarcia198/RetrofitAndRoomSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Android Basic Retrofit and Room Sample

This is a simple implementation of Android Architecture Components: https://developer.android.com/topic/libraries/architecture/guide.html
It is based on the one of Philippe Boisney: https://github.com/PhilippeBoisney/GithubArchitectureComponents although my approach is simpler without using Dagger nor ButterKnife.

Getting Started

This simple app has onle one screen. When it starts, it will fetch photos of a given album from the API https://jsonplaceholder.typicode.com/photos and it will save this info into a database. The photos are shown in a RecyclerView. Only when the photos in the database are not fresh enough they will be downloaded again. In order to browse photos there is a Spinner to choose the album and an EditText to enter a photo title. When restarting the activity or rotating the device the screen keeps the same information.(One of the good things of using ViewModel and LiveData).

Preview

Architecture Components

This application implements the following concepts :

  • ViewModel
  • LiveData
  • Room

Libraries used

Author

Ignacio Garcia - ([email protected])

Acknowledgments

Philippe Boisney https://github.com/PhilippeBoisney/

About

A simple implementation of Android "Architecture Components" sample explained by Google : https://developer.android.com/topic/libraries/architecture/guide.html

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published