Graphics, images and animation developed by Android (5) detailed explanation of layoutanimationcontroller

First, we need to introduce layoutanimationcontroller:

*1. Layoutanimationcontroller is used to set the animation effect (i.e. the whole layout) for the control in a layout or a ViewGroup * 2. Each control has the same animation effect * 3. The animation effect of these controls is displayed in different implementations * 4. Layoutanimationcontroller can be set in XML files, It can also be set in the code

This article introduces two methods to implement layoutanimationcontroller:

1、 Implementation in XML file

The steps are shown in the figure below:

An example of implementation is to click the "test" button to display the view in the form of animation. The screenshot is as follows:

The specific implementation process is as follows:

Two animation XML files are required:

1.list_ item_ layout

The implementation steps are as follows:

The code used in this example is as follows:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>