©2023 Fetch. This is Fetch icon, a little bit redesigned by me, it's not meaning that you can use that!
Used languages: Kotlin, Android XML, Groovy(build.gradle), SQL(one request).
My stack: MVVM + Clean Architecture + Usecases, Single Activity
Used dependencies: Koin, Coroutines, Retrofit, Room, Jetpack Navigation, Logging Interceptor (for tests).
- To get an array from the REST Api;
- Order that first of all by "listId" and only then by "name";
- Filter out any item, which includes null or blank data in column "name";
- Show as understandable list.
- Additional sorting via SQLite + saving to see data offline.
- Coroutines: Competently(for my level) wrote code using Kotlin Coroutines, especially of REST & SQL Requests.
- SwipeToUpdate: As you know, it caching data in database, for updating remote list or database cache you can just swipe to update.
- Main thing: I wrote code as good as I could, if even it wasn't indeed to write/make a lot things for this small testing task. Some little things: Theme, splashScreen, icon, cardView, bottomNavView, navigation, etc.
Sorted/Rest Display:
Application is getting an array from https://fetch-hiring.s3.amazonaws.com/hiring.json using Retrofit+GsonConvertor via usecase from data repository to the viewModel, sorting that in viewModel and providing to UI(in this case RecyclerView), mostly vice versa, because UI is observed to MutableLiveData in viewModel. Easily realized with Koin :)
Sorted/Local Display:
Almost same like above, however first of all it's inserting remote list to the local base and then getting list from database with SQL request using "where", "order by" etc.
Unsorted Display:
Just getting list from remote source and showing without any sorting/filtering to see difference between two previouses.
More screenshots: