A modern Android app to fetch and display the latest news articles using the NewsAPI! The app is built with Jetpack Compose for a clean and intuitive user interface and leverages Kotlin for robust development.
- 🌎 Fetch top headlines across various categories (e.g., general, technology, sports).
- 🔍 Search news articles based on keywords.
- 📜 View detailed articles in-app with seamless navigation.
- 🎨 Modern UI built with Jetpack Compose.
- 📰 Real-time updates powered by LiveData.
_To be added
- Programming Language: Kotlin
- Architecture: MVVM (Model-View-ViewModel)
- UI Framework: Jetpack Compose
- Networking: NewsAPI
- Libraries:
- Android Studio Flamingo or later.
- An API Key from NewsAPI.
Follow these steps to run the app on your local machine:
gh repo clone asp616848/Kotlin-News-App
cd Kotlin-News-App
Replace the placeholder in API.kt
with your NewsAPI key:
object API {
const val KEY = "YOUR_API_KEY"
}
- Open the project in Android Studio.
- Sync Gradle files.
- Build and run the app on an emulator or physical device.
├── MainActivity.kt # Entry point of the app
├── ViewModel # Contains ViewModel logic
│ └── ViewModel.kt # Manages API data and LiveData
├── ui # Contains all UI components
│ ├── HomePage.kt # Displays top headlines
│ ├── NewsArticlePage.kt # Displays individual article details
│ ├── theme # App theme and styling
├── API.kt # Stores the NewsAPI key
└── utils # Utility classes (if any)
- Add offline caching for articles.
- Implement user preferences for favorite categories.
- Add dark mode toggle.
Contributions are always welcome! If you’d like to contribute:
- Fork the repo.
- Create a new branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m "Add some feature"
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.
- NewsAPI for providing the data.
- Jetpack Compose for the amazing UI framework.