About the use of layoutanimations in Android Apidemos

Source: Internet
Author: User

1. Needs, need to add as shown, the number of each unit is not the same, if you use adapter, you need to give several adapter to set up data, here refer to Google to Apidemos in layoutanimations dynamic Add the demo, That is, add the child control dynamically and there can be animated effect, here animation effect slightly, view Apidemos source code can.

2. The layout is as follows

3. Problem: In code that uses Apidemos directly, when Fixedgridlayout is Onmeasure method, the interior will add an extra piece of content to the container based on the current child control to prevent the child control from adding a problem, but in this case, You need to match the length of each layout with the bottom of the child controls, which need to be changed

After this change, the dynamically added Fixedlayout container's height will not be more than a single cut.

About the use of layoutanimations in Android Apidemos

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.