Sculpt a snowman (decorate the application)

    Good news. New Years is soon.
    And if you want, you don’t want to, but users need to create a New Year mood.


    Freeloaders designers / illustrators - they nailed a snowflake / hat / twig to the logo a long time ago and ran to buy gifts with a clear conscience. Well, we, stupid programmers - do not know how easy.

    First, of course, I decided to make snow. Many years ago, I also made snow for my first site. Apparently such a tradition.
    I downloaded Nine Old Androids (backport of animations from the third anroid) , launched Droid Flakes:

    I remember Max Payne because of the snow. It was very atmospheric there was snow. You used to sit and stick.


    How many snowflakes do you think are in the picture above? One thousand? So here. I seem to have the most powerful smartphone from what was in the store. And he already crashes on 256 objects. Which are not even in a sinusoid-closer-farther-right-left-turn, but fly stupidly down. No, we don’t need such snow. It’s not snow at all, it’s some falling robots. You can probably optimize, but time is running out.

    Several hours were killed in search of a beautiful, free New Year font with Cyrillic support. I guess I was not looking there.

    I already decided to give up and whine on Skype to familiar designers with a request to nail a twig to the logo, when it dawned on me -

    Preloader! The preloader is unobtrusive. Its easy to do. It does not slow down, does not consume resources, and in general is a nanny.

    So, a simple recipe, how to mold a snowman in half an hour to the New Year's table:

    1. Choose a preloader.
    - I chose here:
    2. Customize for myself
    - set the size
    - background color
    - number of
    screen frames , for just plain
    3. Click - Download as sprites (immediately rename the file with letters like snowman)
    4. Open in Photoshop
    - set guides
    for (int i = 0; i - View / New Guide
    - guide.setValue (i * frame.getWidth);
    (well, in the sense I don’t know if there is any scripting language in Photoshop and how to use it. As a result, I clicked a moron 12 times. Do not worry, this is the most difficult part)
    - Select the Slice tool (I hid it in the right click on the crop icon)
    - Button - Slice from guides (unexpectedly appeared at the top)
    - File / save for web and devices
    5. Copy / paste the icons to the drawable folder
    6. Open Idea
    - right-click on the Drawable folder, New / Drawable resource file - loader .xml
    - paste the text:

    - open our layout and add a new, brilliant progress bar

    7. Open the activity in which our sexy snowman will rotate the hips

    - Declare, initialize:
    private ImageView progressBar;
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                Bundle savedInstanceState) {
            View v = inflater.inflate(R.layout.videos, container, false);
            progressBar = (ImageView)v.findViewById(;

    - Run the animation (for example, on request):
        private String restRequest(Bundle params,Boolean useCashe,int httpVerb,int mode,String method) {
   Runnable() {
                public void run() {
                    AnimationDrawable frameAnimation =
                        (AnimationDrawable) progressBar.getBackground();

    - Extinguish the animation (for example, to the answer):
        private void onRESTResult(int code, String result, int mode) {

    The snowman is ready!

    Here is the result:
    - a picture
    - an archive with a cut snowman and a layout, for lazy people
    - application
    [I removed the link to applications, so as not to confuse advertising]

    Also popular now: