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.
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).
This application implements the following concepts :
- ViewModel
- LiveData
- Room
- Android Support Library
- CardView
- RecyclerView
- Android Architecture Components
- Retrofit for REST api communication
- Glide for image loading
Ignacio Garcia - (ignaciogarcia198@gmail.com)
Philippe Boisney https://github.com/PhilippeBoisney/