Skip to content

A template repository for initiating projects with a prebuilt clean code structure, including APIs and shared preferences integration.

License

Notifications You must be signed in to change notification settings

Ammar-Ishfaq/Android-Hilt-Template

Repository files navigation

Android Hilt MVVM Project Template 📱

This Android project template provides a solid foundation for building modern Android applications using Hilt for dependency injection and MVVM architecture pattern.

Features 🚀

  • Retrofit for network requests
  • Hilt for dependency injection
  • MVVM architecture pattern
  • Clean code architecture
  • Jetpack Compose Navigation
  • XML-based UI (not Jetpack Compose UI)

Requirements 🛠️

  • Android Studio Hedgehog | 2023.1.1 Patch 2 or later
  • Kotlin version 1.5 or later

Getting Started 🏁

  1. Clone this repository to your local machine:

    git clone https://github.com/Ammar-Ishfaq/HiltTemplate.git
  2. Open the project in Android Studio.

  3. Build and run the project.

Usage 📝

This project template provides a structured approach to building Android applications using Hilt for dependency injection and MVVM architecture pattern. You can customize and extend it according to your specific requirements. Here are some key points to consider:

  • Network Requests: Use Retrofit for making network requests. Define your API endpoints and services using Retrofit interfaces.

  • Dependency Injection: Utilize Hilt for dependency injection. Define your modules and components to manage dependencies across your application.

  • MVVM Architecture: Follow MVVM architecture pattern to separate concerns and make your code more maintainable. Utilize ViewModel and LiveData to manage UI-related data in a lifecycle-conscious way.

  • Clean Code Architecture: Organize your code into layers such as presentation, domain, and data. Use packages to separate concerns and maintain modularity.

  • Jetpack Compose Navigation: Use Jetpack Compose Navigation for navigating between composables. Define your navigation routes and screens in the navigation graph.

  • XML-based UI: This project template uses XML for defining UI layouts. Utilize XML layout files to create user interfaces using standard Android views and widgets.

Contributing 🤝

Contributions are welcome! If you have any ideas, suggestions, or bug fixes, feel free to open an issue or submit a pull request.

License 📜

This project is licensed under the MIT License.