Skip to content

Repository files navigation

Image Loader

A simple Android application built with modern Android development practices to load and display an image from a given URL.

📸 Features

  • Load an image from a URL input by the user.
  • Display a loading indicator while the image is being fetched.
  • Display the loaded image on the screen.
  • Clear the displayed image.
  • Clean, single-activity architecture using Jetpack Compose.

🛠 Tech Stack & Architecture

This project follows the principles of Clean Architecture and utilizes a modern Android technology stack.

  • UI: Jetpack Compose for building the UI declaratively.
  • Architecture:
    • MVVM (Model-View-ViewModel)
    • Clean Architecture (UI -> Domain -> Data layers)
  • Dependency Injection: Koin for managing dependencies.
  • Asynchronous Programming: Kotlin Coroutines and Flow for managing background tasks and state.
  • Modularity: The project is split into :app and :imageLoader modules to separate concerns.
  • Code Quality: ktlint is configured with a Git pre-commit hook to automatically format code and maintain a consistent style.

🚀 Setup and Installation

  1. Clone the repository.
  2. Open the project in Android Studio.
  3. Let Gradle sync the dependencies.
  4. Activate the Git Hook (Optional but Recommended): To enable automatic code formatting before each commit, run the following commands from the project root directory in your terminal:
    cp pre-commit-hook.sh .git/hooks/pre-commit
    chmod +x .git/hooks/pre-commit
  5. Build and run the application on an emulator or a physical device.

🏗 Project Structure

The project is divided into two main modules:

  • :app: The main application module, containing the UI (Compose screens), ViewModel, and dependency injection setup for the application.
  • :imageLoader: A library module responsible for the core logic of fetching and decoding an image from a URL. This module contains the data and domain layers.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages