🗡️ Pokedex demonstrates modern Android development with Hilt, Coroutines, Flow, Jetpack (ViewModel), and Material 3 Design based on MVVM architecture.
Go to the Releases to download the latest APK.
-
Minimum SDK level 21
-
Kotlin based, Coroutines for asynchronous.
-
Jetpack
- Lifecycle: Observe Android lifecycles and handle UI states upon the lifecycle changes.
- ViewModel: Manages UI-related data holder and lifecycle aware. Allows data to survive configuration changes such as screen rotations.
- DataBinding: Binds UI components in your layouts to data sources in your app using a declarative format rather than programmatically.
- Hilt: for dependency injection.
-
Architecture
- MVVM Architecture (View - DataBinding - ViewModel - Model)
- Repository Pattern
-
kapt: Kotlin Annotation Processing Tool
-
Coil:Loading images from network.
-
Palette: For determining dominant colour
-
Timber: A logger with a small, extensible API.
Pokedex is based on the MVVM architecture and the Repository pattern, which follows the Google's official architecture guidance.
The overall architecture of Pokedex is composed of two layers; the UI layer and the data layer. Each layer has dedicated components and they have each different responsibilities, as defined below:
Pokedex was built with Guide to app architecture, so it would be a great sample to show how the architecture works in real-world projects.
- Each layer follows unidirectional event/data flow; the UI layer emits user events to the data layer, and the data layer exposes data as a stream to other layers.
- The data layer is designed to work independently from other layers and must be pure, which means it doesn't have any dependencies on the other layers.
With this loosely coupled architecture, you can increase the reusability of components and scalability of your app.
The UI layer consists of UI elements to configure screens that could interact with users and ViewModel that holds app states and restores data when configuration changes.
For more information, check out the Guide to Android app modularization.
Pokedex using the PokeAPI for constructing RESTful API.
PokeAPI provides a RESTful API interface to highly detailed objects built from thousands of lines of data related to Pokémon.