Darkei @ 05.21.10, 10:52
Creating a BootAnimation Step-By-Step By Darkei
I would like to add (expand) this instruction. The fact is that the instruction was written in 2010 and was edited last time in 2014. Since then, much water has passed under the bridge, new versions of Android have appeared, and the mechanism of butanimations has become much more flexible and powerful.
I will not dwell on the rules for naming files, the degree of compression ZIP, etc. I will dwell only on what is connected with innovations.
So:
The file format for desc.txt is now in general:
WIDTH HEIGHT FPS
TYPE COUNT PAUSE PATH [#RGBHEX CLOCK]
TYPE COUNT PAUSE PATH [#RGBHEX CLOCK]
TYPE COUNT PAUSE PATH [#RGBHEX CLOCK]
.....
TYPE COUNT PAUSE PATH [#RGBHEX CLOCK]
In brackets - parameters that are optional.
Explanations:
Widtth - (as it was) the width of the image in pixels
HEIGHT - (as it was) the height of the image in pixels
FPS - (as it was) the speed of the demonstration, the frame rate, measured in frames (frames) per second
TYPE - (new) instead of the type "p" it is allowed to specify the type "c". Type "p" means that the animation will be interrupted if the system load has completed. Type "c" means that even if the download is completed, the animation will continue until the end of the current plot (
unless the plot is with an infinite loop (COUNT = 0) - in this case there will be trouble, see below )
COUNT - (as it was) the number of cycles of the plot
PAUSE - (new) pause at the end of this story before the next demonstration. Measured in frames. For example, if you set PAUSE = 5 when FPS = 20 is set, then the pause will be 1/4 second
PATH - (as it was) the name of the folder with the files of this plot
#RGBHEX - (new) background color (for those cases when the frame does not occupy the entire screen area, or has transparent areas). Indicated as the ratio of red, green, and blue in hexadecimal format (#RRGGBB). For example, a green background is defined as: # 00FF00
CLOCK - (new) vertical coordinate (Y) with which the image is located. Usually used in watches on Android.
In practice, the popular format of butanimation is a composition of three plots of the "c" type, where the first plot is played once, then the endlessly second, and once at the end the third.
If the system loading is completed during a conditionally infinite demonstration of the second plot, the second plot will be “screwed up” to the last frame, then the third plot will be played once, and after that we will see the working interface of the device.
When creating an animation, you must follow the rule - the last story, if it is of type "c", must not be infinite (COUNT в‰ 0), otherwise we will never wait for the working interface of the device to appear on the screen.Another innovation. You can put a sound file in each folder.
audio.wav , and its sound will be played once at the beginning of each cycle of the corresponding plot. Accordingly, you can make for each story its own audio. Unfortunately, this does not work on all devices (some cannot reproduce sound until the system is fully loaded - however, the presence of such audio files does not cause problems - the sound is simply not reproduced, that's all)
Another innovation. Each folder may contain a file.
trim.txt containing lines by the number of files in the folder. Strings have the format
WxH + X + Y where W and H are the width and height of the frame, respectively, and X and Y are the image coordinates, respectively, horizontally and vertically. Using this method, for example, you can put files similar in content to a folder, and using a file
trim.txt to make the plot of the animation not a change of pictures, but a change in the size and position of the same picture. However, for this you still have to fill the folder with pictures by the number of frames, although they will be the same between them.
Well, so far - nothing new. :)
Post has been editedvadolaz - 28.09.17, 21:19Reason for editing: in the header