Gen 1 Pokémon Pokédex Built with Jetpack Compose
COMPOSE-MY-POKEDEX:
Jetpack Compose Project – WIP
A Generation I Pokémon Pokédex Built with Android Jetpack Compose & Kotlin
Features
- Search functionality
- Generation IV Johto pokédex design
- Dual upper/lower UI on a single screen
- All 151 Gen 1 pokémon general stat information
- Collects pokémon data & large sprites from PokéAPI
- Collects pokémon mini-sprites from Pokémon Database
Application UI Inspiration Snapshot
Progress:
- 100% working
- added basic search capability
- applied basic application icon
- loads images asynchronously via coil
- duplicate items in database are overwritten
- creates internal list of pokemon [1-151] no problem
- serializes pokemon data classes via kotlinx.serializer
- viewmodel keeps data current through configuration changes
- viewmodel is passed as argument to app ui for easy data retrieval
- added lower nav bar for additional choices [details / search / quit]
- sends get requests to [2] different apis for data and icons via retrofit
- class converter created for handlinng list & map storage in room database
- calls to database are made asynchronously in order to operate on the main thread
- database class created using singleton method & initialized upon viewmodel startup
- downloaded data is saved internally upon application destruction via room database
Issues:
- screen rotation is deactivated
- reconstruction of ui-state interface is needed
- internet permissions prompt not implemented
- pokemon description language change after id-151
- app must restart if internet access is lost during first build
- only 2/4 of each item’s information is being displayed / used
To-Dos:
- add additional pokemon to the list [1-500]
- add “allow internet permissions” upon initial app startup
- construct the ui details page to display information not being shown
- apply screen orientation handling for various screen sizes & rotations
- implement additional json serializers for description language changes
Dependencies
- Coil – An image loading library for Android backed by Kotlin Coroutines.
- Retrofit – A type-safe HTTP client for Android and Java.
- Kotlinx.serialization – Compiler plugin that generates visitor code for serializable classes.
- Kotlin Serialization Converter – A Retrofit 2 Converter.Factory for Kotlin serialization.
- Java Scalars Converter – A Converter which supports converting strings and both primitives and their boxed types to text/plain bodies.
- Room Persistence Library – Provides the convenience of data caching for offline browsing.
- System UI Controller – Adds utilities for updating the System UI bar colors within Jetpack Compose.