fbpx Inside Weather Now: Custom View Animation Using RxAndroid | Leapfrog Technology

Inside Weather Now: Custom View Animation Using RxAndroid

Built using RxAndroid

Our engineer is always looking to expand their programming skills. Our mobile dev team developed a real app Weather Now while learning Rx-Android and MVP pattern in custom views and custom animations. The app uses RxAndroid to act as an observer for network calls and manipulate the response that we get using mapping functions.

Weather Now is a beautiful mobile app for android users, with minimal UI giving a quick overview of a week’s forecast. It is straight to the point weather app that shows you only the information relevant to you- the weather!

App features

  • Automatic location detection
  • Humidity, pressure, temperature and wind conditions
  • Current condition, temperature, low and high temperatures
  • Beautiful animated weather icons according to the current weather condition
  • 7-day future forecast
  • Weather info in line graphs displaying hourly weather info.
  • Tap to see full weather details and swipe to see following day’s forecast.
Weather Now

What is RxAndroid?

Reactive Programming is a popular term in mobile app development. RxAndroid adds the minimum classes to RxJava that make writing reactive components in Android applications easy and hassle-free.

RxJava extensions for Android will help you with Android threading and Loopers, and RxBinding provides a binding between RxJava and Android UI elements like Buttons and TextViews.

If you are not familiar with the Rx or FRP terminologies, you can take a look at this post by Josh Skeen to get a good overview of FRP. You can also refer to this post by Dan Lew to get started with RxAndroid.


Android also provides lots of value animations for the view.

  • Frame-by-frame animation
    A series of frames are drawn one after the other at regular intervals by loading a set of Drawable resources.
  • Layout animation
    Animate views inside a container view such as lists and tables.
  • View animation
    Animate any general-purpose view.

The animations that we used in Weather Now are handled by the custom views. For each weather type, there is a custom widget that is an integrated part of its view hierarchy and manually does its animation drawing.

There are separate threads for each different type of custom animation logic. Once the thread does some logical kind of manipulation, the view is informed to get invalidated by the use of handler that has been passed to the thread during its creation.

Let’s take an example of a simple cross animation that we used to inform the users that there is no internet connection.


About the Author: Manas Shrestha is an Android developer at Leapfrog Technology Inc. He is passionate about music and gaming. His hobbies are traveling and photography.

Leapfrog Technology, Inc. is a technology company that provides mobile app development services for companies and individuals.

Find us on Facebook, Twitter, and Instagram

More in Blogs

You don’t know what you don’t know! Technology

You don’t know what you don’t know!

When working with computers, we often encounter issues that we never anticipate. If you have written a piece of software,

Read more
MVS: Digital Solution for COVID Vaccination Appointment Scheduling InsightsTechnology

MVS: Digital Solution for COVID Vaccination Appointment Scheduling

Problem Statement Mankind is facing one of the biggest challenges in recent history due to the spread of the Covid-19

Read more
Problems of Event Sourcing Pattern Technology

Problems of Event Sourcing Pattern

In one of our projects, our backend server is built by using the prevalent programming language Golang.  Communicating to databases

Read more