A powerful and user-friendly app to get real-time weather updates, a 7-day forecast, and customize your weather experience.
The Weather Forecast App provides accurate and up-to-date weather information for your current location or a selected city. With a user-friendly interface and robust architecture, the app ensures a seamless experience for weather updates.
- Today Fragment:
- Displays the current location's temperature, humidity, and weather conditions.
- Week Fragment:
- Provides a 7-day weather forecast, including key details for each day.
- Settings Fragment:
- Allows users to:
- Switch between Metric and Imperial units.
- Customize the app's theme (Light/Dark).
- Search for and update the weather for different cities.
- Allows users to:
- Bottom Navigation Bar:
- Quick navigation between Today, Week, and Settings fragments.
- Java: Core language for development.
- XML: Designed the responsive and intuitive UI.
- MVVM Architecture: Ensures scalability, separation of concerns, and maintainability.
- Retrofit: Used for fetching weather data via RESTful APIs.
- Glide: Efficiently loads and displays weather-related images.
- Displays real-time weather data:
- Temperature
- Humidity
- Weather condition
- Provides a detailed 7-day forecast with essential weather information.
- Theme customization (e.g., light or dark mode).
- City selection using a search bar.
Today Weather | Week Weather | Setting |
---|---|---|
![]() |
![]() |
![]() |
- Clone this repository.
git clone <repository-url>
- Open the project in Android Studio.
- Build and run the project on an emulator or physical device.
The app fetches weather data using a weather API. Ensure you add your API key in the build.gradle
or local.properties
file:
API_KEY="your_api_key_here"
Here are the major libraries used in this project:
- Dagger Hilt: Dependency Injection
- Retrofit: REST API integration
- Glide: Image loading and processing
Add the following dependencies to your build.gradle
file:
implementation "com.google.dagger:hilt-android:<version>"
kapt "com.google.dagger:hilt-compiler:<version>"
implementation "com.squareup.retrofit2:retrofit:<version>"
implementation "com.github.bumptech.glide:glide:<version>"
kapt "com.github.bumptech.glide:compiler:<version>"
The app follows the MVVM (Model-View-ViewModel) architecture:
- Model: Manages data, including API calls using Retrofit.
- View: UI components, including fragments for Today, Week, and Settings.
- ViewModel: Acts as a bridge between Model and View, ensuring clean separation of concerns.
- Launch the app.
- Use the bottom navigation bar to switch between Today, Week, and Settings fragments.
- In the Today fragment, view real-time weather data.
- In the Week fragment, explore the 7-day forecast.
- In the Settings fragment:
- Change the theme.
- Search for and select a city to update the weather data.
This project is licensed under the MIT License. See the LICENSE file for more details.
Developed by Rahul Joshi - GitHub: https://github.com/Rahul-JoshiG - LinkedIn: www.linkedin.com/in/prof-rahul-joshi - Email: prof.rahuljoshi@gmail.com