- Kotlin
- MVVM
- Clean Architecture
- Use-cases
- Hilt (Dependency Injection)
- Room (Persistence library)
- Retrofit
- Navigation
- Automated tests (Espresso)
- Unit Tests (Junit4)
This project uses Clean Architecture with three different layers as recommended by Google:
- Data (data layer: exposing application data)
- Domain (containing use-cases and business logic)
- UI (displaying data to user)
The project consists of 4 different Fragment
s with a single Activity
. It uses one
base Fragment
to avoid the repetition onCreateView()
and onViewCreated()
methods for Fragment
s, as well as a BaseAdapter
for Adapters.
- The mainScreen (
Fragment
) - loads saved albums from Database. - AlbumInfo
Fragment
which acceptsid
,albumName
andartistName
as arguments and then makes the call to the server to get the specific album detail. - Search Artist - where it searches for artists based on a name.
- Top albums - when user clicks on an album, the apps navigates to top albums to show the top albums of that specific artist.
Navigation:
Screens and UI:
Unit tests are written for the Repository
. For the Repository
tests they are written
using Mock
and JUnit4
.
Instrumentation tests are written for the Activity
and Fragment
. For the Fragment
tests they
are written using Espresso
and JUnit4
.
- Add more tests for the
ViewModel
andRepository
. - Add/Improve Unit tests.
- Handle errors within the albums.