Custom-made animations
Let's start by showing how we can animate some values ourselves without relying too much on the methods and classes provided by the Android SDK. In this section, we'll see how to animate a single property or several properties using different mechanisms. By doing so, we could then apply the approach that suits us better on our custom views, depending on the type of animation we want to achieve or the specificities of the view we're implementing.
Timed frame animations
We have already used this kind of animation on the 3D example in our previous chapter. The main concept consists of assigning a new value to all the animatable properties before drawing a new frame based on the amount of time passed. We can be tempted with incrementing or computing a new value based on the number of frames drawn, but that is highly inadvisable, as the animation will be played at different speeds depending on the speed of the device, computation, or drawing complexity and other processes...