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