- Uses complete MVVM (model-view-viewModel).
- With data and viewBinding instead of ViewIDs.
- Has a dedicated repository layer for remote api endpoint along with interface
- Albums use data class (the 'model')
- Used Retrofit http client with okhttp interceptor and user agent
- Used KotlinXConverter factory for serialization of JSON
- Used ktx as Jackson mapper is slow compared to that, and I am more comfortable with ktx
- Use Coroutines for api calls and asynchronous IO tasks.
- Used try catch blocks where needed
- ViewModel live state is continuously observed in a sealed class
- The sealed class is used to emit errors, loading and success in Home Fragment.
- Users see a toast message in case of error.
- Used recycler View Adapter and viewholder to populate the response.
- Implemented Coil-KT by Coroutines as Image loading library which has advantages over Glide.
- Instead of traditional progress bar, Used the shimmering effect library from Facebook that look more appealing.
- Used the Material 3 search bar + View to integrate search.
- The editText on changed listener that focuses on text change and immediately filters the list.
- It performs a Fuzzy Search that finds matching Query and ignores casing (caps).
- The directly performs search in fragment itself without needing context and callbacks, keeping code concise and without taking toll on performance.
- The album api endpoint was lacking image urls, So I switched the endpoint with photos that was complex and time consuming.
- Even without paging support, the response is loaded in chunks (20 items) (memory safe)
- Viewmodel has caching and It does not re-fetches the api even when screen is rotated
- Uses latest Kotlin tools and SDKs.
Download APK from Releases. It's a Debug unsigned universal arch build so it is big in size and can give play protect warning