This is a sample project that uses Room database with Retrofit to display a list of data in a
RecyclerView using data binding.
Migration to Hilt Dependency Injection - updateToHilt (Branch)
The programming language is the Kotlin, it is a
modern, JVM-based programming language that is concise, safe, and interoperable with Java.
Kotlin Coroutines is used for asynchronous
tasks.
Kotlin KTX is a collection of Kotlin extensions that
offer more concise and expressive code for working with Android APIs and libraries.
Room Database is responsible for saving
the retrieved data from the remote server, querying data from the local database, and supporting
offline functionality.
Retrofit is responsible for making requests and retrieving
data from the remote server. (Repository)
Data Binding in Android lets you link
UI components to data directly in the XML layout. It automatically updates the UI when the data
changes, reducing the need for manual coding and making the app easier to maintain.
View Binding in Android is a feature
that automatically generates a binding class for each layout, providing direct access to the views
without using findViewById()
. It ensures safer, type-checked code by reducing the risk of errors
like NullPointerException
, making the code simpler and more maintainable.
Navigation in Android manages how users move
between screens. The Navigation Component simplifies this by using a navigation graph to define and
handle navigation paths, back stack management, and data passing between screens.
Live Data in Android is a
lifecycle-aware data holder that allows UI components to observe data changes. It automatically
updates the UI when data changes, ensuring updates occur only when the component is in an active
lifecycle state, preventing memory leaks and crashes.
MVVM with repository is an
architecture where the Repository manages data sources (e.g., network, database), the ViewModel
processes the data for the UI, and the View displays the UI, ensuring a clear separation of
concerns.
KSP ("Kotlin Symbol Processing") is a tool for
efficient annotation processing in Kotlin, providing faster code generation and symbol manipulation
compared to KAPT.
R8 enabled, is a code shrinker and obfuscator for
Android that optimizes and reduces the size of APKs by removing unused code and resources, while
also obfuscating the remaining code to improve security.
Target SDK version: 35
Minimum SDK version: 28
Kotlin version: 2.1.0
Gradle version: 8.7.3
https://github.com/r-spacex/SpaceX-API (GitHub)
https://docs.spacexdata.com/?version=latest (Postman)