Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the Animation resources in Android

Shulou Source: shulou.com Published: 2022-06-02 06:07:44 11月14日 Update

This article introduces the relevant knowledge of "what are the Animation resources in Android". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The sample program in SDK, App- > Activity- > Animation, demonstrates the animation effect of switching Activity. Provides two kinds of animation effects, one is the Fade In gradient, the later Activity is gradually displayed from shallow to deep, and the other is the Zoom magnification effect, and the later Activity is gradually displayed from small to large.

There are two types of Animation resources in Android:

Tween Animation carries out various transformations (zoom, translation, rotation, etc.) on a single image to achieve animation.

Frame Animation is displayed sequentially by a set of images to display animation.

Tween Animation is used in Animation, and resources are R.anim.fade, R.anim.hold, R.anim.zoom_enter, R.anim.zoom_exit.

R.anim.fade and R.anim.zoom_enter are Fade In and Zoom animation resources respectively. It is defined as:

Fade.xml

Zoom_center.xml

The format of the tween animation resource definition is as follows:

Tags: Animation resources effects parameters switching code content more knowledge translation selection practicality learning and then from shallow to deep two size event function single Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Huawei MySQL Shulou Technology Xiaomi