Country Flags App is an Android application that allows users to explore different countries, view their flags, and get more information about each country, including its capital, region, language, and currency. The app fetches country data from a remote API and stores it locally using the Room Database for offline access.
-
Kotlin: The primary language for Android development.
-
Jetpack Libraries:
- Room: Local database for storing country data offline.
- LiveData: To observe changes in the data and update the UI accordingly.
- ViewModel: Manages UI-related data lifecycle-consciously, ensuring that data survives configuration changes like screen rotations.
- Navigation Component: For managing in-app navigation between fragments and simplifying the back-stack management.
- Fragment: The app is designed with fragments to display different UI sections. The country list and details are presented in separate fragments.
- ViewBinding: Simplifies binding views by eliminating the need for
findViewById
. Itโs used for safely accessing UI elements. - Lifecycle: Lifecycle components are used to manage the appโs lifecycle, ensuring UI updates only happen when fragments or activities are in an appropriate state (e.g., in the foreground).
-
Retrofit2: A type-safe HTTP client for making network requests to fetch country data.
-
Coroutines: For asynchronous programming and background tasks.
-
Glide: Used for loading country flag images from URLs into ImageViews.
-
Dagger Hilt: For dependency injection to manage the app's dependencies.
-
Material Components: For consistent UI components across the app.
-
ConstraintLayout: For flexible and responsive UI design.
-
RxJava: For handling asynchronous operations and managing complex streams (optional for future updates).
Image 1 | Image 2 |
---|---|
![]() |
![]() |
Image 3 | |
![]() |