Android --- layoutAnimation Application

Source: Internet
Author: User

1. Write a left_in.xml Method


[Html]
<? Xml version = "1.0" encoding = "UTF-8"?>
<Translate xmlns: android = "http://schemas.android.com/apk/res/android"
Android: duration= "300"
Android: fillAfter = "false"
Android: fromXDelta = "-550"
Android: toXDelta = "0">
</Translate>
<? Xml version = "1.0" encoding = "UTF-8"?>
<Translate xmlns: android = "http://schemas.android.com/apk/res/android"
Android: duration= "300"
Android: fillAfter = "false"
Android: fromXDelta = "-550"
Android: toXDelta = "0">
</Translate>

 

2. Write a layoutAnimation. xml Method


[Html]
<? Xml version = "1.0" encoding = "UTF-8"?>
<LayoutAnimation xmlns: android = "http://schemas.android.com/apk/res/android"
Android: animation = "@ anim/player_info_left_in"
Android: animationOrder = "normal"
Android: delay= "0.75">
 
</LayoutAnimation>
<? Xml version = "1.0" encoding = "UTF-8"?>
<LayoutAnimation xmlns: android = "http://schemas.android.com/apk/res/android"
Android: animation = "@ anim/player_info_left_in"
Android: animationOrder = "normal"
Android: delay= "0.75">

</LayoutAnimation>


3. Load in a View with multi-row sub-controls, such:


[Html]
<? Xml version = "1.0" encoding = "windows-1250"?>
<TableLayout
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent"
Android: layoutAnimation = "@ anim/left_in_player_info_show_anim">
<TableRow ....../>
<TableRow ....../>
<TableRow ....../>
<TableRow ....../>
<TableRow ....../>
</TableLayout>
<? Xml version = "1.0" encoding = "windows-1250"?>
<TableLayout
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent"
Android: layoutAnimation = "@ anim/left_in_player_info_show_anim">
<TableRow ....../>
<TableRow ....../>
<TableRow ....../>
<TableRow ....../>
<TableRow ....../>
</TableLayout>
4. In this way, you can load the animation effect by <TableRow/> row by row when opening the xml page above.

 


PS: Android provides very good functions, which is much simpler than SurfaceView ....

Author: bys0201
 


 

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.