/compose-weather-app

Primary LanguageKotlinApache License 2.0Apache-2.0

Composed Weather

Workflow result

📜 Description

This is a simple weather app made with Jetpack Compose for the final week of Android Dev Challenge. It uses dummy data to show 24 hours of forecast for a single city. The city can be selected from a list below. User can add new cities by clicking the add button and remove them by long press.

💡 Motivation and Context

In this app I played around with animations. The current weather is shown animated in the main image at the top - clouds move, rain and snow is falling, stars twinkle :-). User can move the animation to another time of day - then sun and moon are travelling across sky, stars rotate and color of the sky animates smoothly from day to night and back. Different weather types also animate in and out based on the data and time of day shown.

The time of day displayed can be controlled in 3 ways:

  • dragging across the weather animation
  • scrolling the weather row with hourly forecast
  • moving the slider above the weather row - this acts as a scroll bar of sorts with the nice side effect of the pin always pointing to current time in the weather row

All 3 of these share a single source of truth, so changing any one of them will also change the other 2.

📸 Screenshots

Here is a low quality (so it can be embedded here) gif of app in action. For better quality, look at video.

video

License

Copyright 2020 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.