Wouldn't it be neat if, whenever we touched the Android home screen, a few more bubbles appeared around where our finger touched the screen? Well, that's what we're going to make next!
In the following example, we will see how to register our ability to handle touch events, how to implement the touch event handlers, and how they will appear on the screen.
BubblesViewanimation to support adding bubbles interactively. We will do this by implementing a method that can handle
MotionEventsand create some extra bubbles.
Open up BubblesView.java and add the following import:
This will allow us to receive motion events from outside.