Consuming API.
-
Create a new App with empty activity
-
Add depencencies and plugins
-
Create the package folder structure
- app
- data
-inside data create
remoteandmodelpackages - di
- repo
- ui
- inside the
uiadd thedetailandactivities
- inside the
- util
-
Create the constants in the util packge
-
create classes in the
modelfrom JSON you get from theremote end point -
create the Api inteface class inside the
remote -
create
applicationclass in side theapp -
crea a
moduleclass in thedi -
Create the
repositoryclass inside therepo -
inside the
ui -
create the layour file to show the cards using cardview with shildren
- Cardview
- linearlayout constraint layout imageview textview -Create the adapter make sure to enable viewBinding in the build.gradle app level
- Cardview
-
Create viewmodel
adjust the activity main xml