Time for action - writing a custom animation
Writing a custom animation is very simple, but not entirely intuitive. For this section you'll define a custom animation which will increase the size of its animated widget by a factor of five, while at the same time fading it until its entirely transparent.
- Create a new XML resource file named
res/anim/vanish.xmland open it in an editor or IDE.
- The root element of the animation file will be an animation
- In the
<set>element, declare an element to define the scale up animation:
- The duration of the scale up animation needs to be set as
- The animation starts to scale from the original ...