This is sample app build on MVVM (Mode-View-ViewModel) architecuture using Andorid Jetpack libraries Navigation Component, ViewModel, LiveData and MotionLayout in Android.
In the current app we fetch data from data.json
from asset and show the details on home page.
It is used to perform a simple navigation from images list to details list by passing postion in details screen as argument.
It is used on image details screen where we click on info icon and it's open up detail text with slide animation.
A single view model HomeViewModel
is share between fragments.
data.json
contains some sample unsplash images for testing.- Retain gridlayout position when screen rotatation.