• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Animation Overview
2
3
4The principle of animation is that the UI appearance is changed for multiple times within a period of time. Because human eyes retain persistence of vision, what you finally see is a continuous animation. A change of the UI is called an animation frame, which corresponds to a screen refresh. An important indicator that determines the animation smoothness is the frame rate (FPS), that is, the number of animation frames per second. The higher the frame rate, the smoother the animation.
5
6
7In ArkUI, an animation is generated by changing the attribute value and specifying the animation parameters. Animation parameters include animation duration, change rule (that is, curve), and more. After the attribute value changes, the original state is transited to the new state according to the animation parameters. In this way, an animation is formed.
8
9
10The animation capability provided by ArkUI can be classified into intra-page animation and inter-page animation based on the page classification mode. As shown in the following figure, an animation on a page refers to an animation that can occur on a page, and an animation between pages refers to an animation that occurs only with redirection between pages.
11
12
13  **Figure 1** Animation by page
14
15![en-us_image_0000001562700385](figures/en-us_image_0000001562700385.png)
16
17
18By capability, the animation can be divided into three parts: attribute animation, explicit animation, and transition animation, as shown in the following figure.
19
20
21  **Figure 2** Animation classified by basic capability
22
23
24![en-us_image_0000001562820753](figures/en-us_image_0000001562820753.png)
25
26
27This topic will introduce you to the usage and precautions of animations by the preceding classification and use cases.
28