A modern Android news application built with Kotlin, following MVVM and Clean Architecture principles.
It integrates the News API with Retrofit2, uses Dagger-Hilt for dependency injection, and leverages LiveData with Coroutines for smooth and efficient data handling.
✅ Latest breaking news from various categories
✅ Search functionality for finding articles
✅ Beautiful, responsive UI with Material Design
✅ MVVM architecture with Clean Architecture principles
✅ Offline caching support
✅ Dark/Light mode support
- Language: Kotlin
- Architecture: MVVM + Clean Architecture
- Networking: Retrofit2
- Dependency Injection: Dagger-Hilt
- Asynchronous: Kotlin Coroutines + LiveData
- UI: XML layouts + Material Design Components
- Image Loading: Glide / Coil
- Android Studio (Latest Version)
- Kotlin 1.8+
- Gradle 8.0+
- API Key from NewsAPI
- Clone this repository:
git clone https://github.com/your-username/NewsApp.git
Open in Android Studio
Add your API key in local.properties:
NEWS_API_KEY=your_api_key_here
Build and Run 🚀
📂 Project Structure com.example.newsapp/ │ ├── di/ # Dagger-Hilt modules ├── data/ # Repository & data sources │ ├── api/ # Retrofit services │ ├── model/ # Data models │ └── repository/ # Data handling logic ├── domain/ # Use cases ├── ui/ # Activities & Fragments │ ├── home/ # Home screen │ ├── details/ # Article details │ └── search/ # Search screen └── utils/ # Helpers & constants
🎨 UI Highlights
Clean Material UI design
Smooth transitions & animations
Optimized layouts for multiple screen sizes
📦 Dependencies // Retrofit implementation "com.squareup.retrofit2:retrofit:2.9.0"
// Coroutines implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1"
// Dagger Hilt implementation "com.google.dagger:hilt-android:2.44" kapt "com.google.dagger:hilt-android-compiler:2.44"
// LiveData & ViewModel implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.6.1" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1"
// Glide implementation "com.github.bumptech.glide:glide:4.15.1"
🤝 Contributing
Contributions are welcome! Feel free to fork this repo, open an issue, or submit a pull request.
📜 License
This project is licensed under the MIT License – see the LICENSE file for details.
🌟 Show Your Support
If you like this project, ⭐ the repo and share it with others!