文件名称:android_LayoutAnimationController
介绍说明--下载内容来自于网络,使用问题请自行百度
如果我们需要一个界面中的多个控件按照相同的动画方式但是每个控件完成该动画的时刻不同的话,就可采用本节讲的LayoutAnimationController来方便的完成了。 参考资料为Mars老师的教程,http://www.mars-droid.com/.
首先我们来看看用java代码怎么完成该功能,主要遵循以下步骤:
在anim下新建一个xml文件,该文件里面设置了控件的动态效果,所以根标签为set。
在java代码中新建一个Animation对象,采用AnimationUtils.loadAnimation()的方法获得,该方法有一个输入参数及anim下的xml文件id。
新建一个LayoutAnimationController对象,输入参数为上一步新建的Animation对象。
设置改LayoutAnimationController对象的属性,比如控件出场的顺序(该顺序主要有随机,从头到尾,反向3种),控件出现的间隔时间等。
在布局文件中加载该LayoutAnimationController对象。-If we need more controls in one interface in accordance with the same animation, but each control to complete the moment of the animation, you can use this section stresses the LayoutAnimationController convenient. Reference to Mars teacher tutorials, http://www.mars-droid.com/ First, we look at how to complete the java code, the following steps: Create a new xml file in anim, the file set the dynamic effect of the control, so the root tag for the set. Java code create a new Animation object, using AnimationUtils.loadAnimation () methods, this method has one input parameter and the anim under the xml file id. New one LayoutAnimationController object on the input parameters for the step by the new Animation object. Set Changing LayoutAnimationController object properties, such as control the appearance of order (the order of the main random, from start to finish, three kinds of reverse), the controls appear interval. Load the LayoutAnimationController objects in the layout file.
首先我们来看看用java代码怎么完成该功能,主要遵循以下步骤:
在anim下新建一个xml文件,该文件里面设置了控件的动态效果,所以根标签为set。
在java代码中新建一个Animation对象,采用AnimationUtils.loadAnimation()的方法获得,该方法有一个输入参数及anim下的xml文件id。
新建一个LayoutAnimationController对象,输入参数为上一步新建的Animation对象。
设置改LayoutAnimationController对象的属性,比如控件出场的顺序(该顺序主要有随机,从头到尾,反向3种),控件出现的间隔时间等。
在布局文件中加载该LayoutAnimationController对象。-If we need more controls in one interface in accordance with the same animation, but each control to complete the moment of the animation, you can use this section stresses the LayoutAnimationController convenient. Reference to Mars teacher tutorials, http://www.mars-droid.com/ First, we look at how to complete the java code, the following steps: Create a new xml file in anim, the file set the dynamic effect of the control, so the root tag for the set. Java code create a new Animation object, using AnimationUtils.loadAnimation () methods, this method has one input parameter and the anim under the xml file id. New one LayoutAnimationController object on the input parameters for the step by the new Animation object. Set Changing LayoutAnimationController object properties, such as control the appearance of order (the order of the main random, from start to finish, three kinds of reverse), the controls appear interval. Load the LayoutAnimationController objects in the layout file.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Android开发历程_10(LayoutAnimationController的初步使用).docx
anim_4/.classpath
anim_4/.project
anim_4/.settings/org.eclipse.jdt.core.prefs
anim_4/AndroidManifest.xml
anim_4/bin/AndroidManifest.xml
anim_4/bin/anim_4.apk
anim_4/bin/classes/com/example/anim_4/BuildConfig.class
anim_4/bin/classes/com/example/anim_4/MainActivity.class
anim_4/bin/classes/com/example/anim_4/R$anim.class
anim_4/bin/classes/com/example/anim_4/R$animator.class
anim_4/bin/classes/com/example/anim_4/R$attr.class
anim_4/bin/classes/com/example/anim_4/R$drawable.class
anim_4/bin/classes/com/example/anim_4/R$id.class
anim_4/bin/classes/com/example/anim_4/R$layout.class
anim_4/bin/classes/com/example/anim_4/R$menu.class
anim_4/bin/classes/com/example/anim_4/R$string.class
anim_4/bin/classes/com/example/anim_4/R$style.class
anim_4/bin/classes/com/example/anim_4/R.class
anim_4/bin/classes.dex
anim_4/bin/jarlist.cache
anim_4/bin/res/drawable-hdpi/ic_action_search.png
anim_4/bin/res/drawable-hdpi/ic_launcher.png
anim_4/bin/res/drawable-ldpi/icon1.png
anim_4/bin/res/drawable-ldpi/icon2.png
anim_4/bin/res/drawable-ldpi/icon3.png
anim_4/bin/res/drawable-ldpi/icon4.png
anim_4/bin/res/drawable-ldpi/icon5.png
anim_4/bin/res/drawable-ldpi/icon6.png
anim_4/bin/res/drawable-ldpi/icon7.png
anim_4/bin/res/drawable-ldpi/ic_launcher.png
anim_4/bin/res/drawable-mdpi/ic_action_search.png
anim_4/bin/res/drawable-mdpi/ic_launcher.png
anim_4/bin/res/drawable-xhdpi/ic_action_search.png
anim_4/bin/res/drawable-xhdpi/ic_launcher.png
anim_4/bin/resources.ap_
anim_4/gen/com/example/anim_4/BuildConfig.java
anim_4/gen/com/example/anim_4/R.java
anim_4/ic_launcher-web.png
anim_4/libs/android-support-v4.jar
anim_4/proguard-project.txt
anim_4/project.properties
anim_4/res/anim/list_anim.xml
anim_4/res/animator/list_anim_layout.xml
anim_4/res/drawable-hdpi/ic_action_search.png
anim_4/res/drawable-hdpi/ic_launcher.png
anim_4/res/drawable-ldpi/icon1.png
anim_4/res/drawable-ldpi/icon2.png
anim_4/res/drawable-ldpi/icon3.png
anim_4/res/drawable-ldpi/icon4.png
anim_4/res/drawable-ldpi/icon5.png
anim_4/res/drawable-ldpi/icon6.png
anim_4/res/drawable-ldpi/icon7.png
anim_4/res/drawable-ldpi/ic_launcher.png
anim_4/res/drawable-mdpi/ic_action_search.png
anim_4/res/drawable-mdpi/ic_launcher.png
anim_4/res/drawable-xhdpi/ic_action_search.png
anim_4/res/drawable-xhdpi/ic_launcher.png
anim_4/res/layout/activity_main.xml
anim_4/res/layout/grid_item.xml
anim_4/res/menu/activity_main.xml
anim_4/res/values/strings.xml
anim_4/res/values/styles.xml
anim_4/res/values-v11/styles.xml
anim_4/res/values-v14/styles.xml
anim_4/src/com/example/anim_4/MainActivity.java
anim_4/bin/classes/com/example/anim_4
anim_4/bin/classes/com/example
anim_4/gen/com/example/anim_4
anim_4/src/com/example/anim_4
anim_4/bin/classes/com
anim_4/bin/res/drawable-hdpi
anim_4/bin/res/drawable-ldpi
anim_4/bin/res/drawable-mdpi
anim_4/bin/res/drawable-xhdpi
anim_4/gen/com/example
anim_4/src/com/example
anim_4/bin/classes
anim_4/bin/res
anim_4/gen/com
anim_4/res/anim
anim_4/res/animator
anim_4/res/drawable-hdpi
anim_4/res/drawable-ldpi
anim_4/res/drawable-mdpi
anim_4/res/drawable-xhdpi
anim_4/res/layout
anim_4/res/menu
anim_4/res/values
anim_4/res/values-v11
anim_4/res/values-v14
anim_4/src/com
anim_4/.settings
anim_4/assets
anim_4/bin
anim_4/gen
anim_4/libs
anim_4/res
anim_4/src
anim_4
anim_4/.classpath
anim_4/.project
anim_4/.settings/org.eclipse.jdt.core.prefs
anim_4/AndroidManifest.xml
anim_4/bin/AndroidManifest.xml
anim_4/bin/anim_4.apk
anim_4/bin/classes/com/example/anim_4/BuildConfig.class
anim_4/bin/classes/com/example/anim_4/MainActivity.class
anim_4/bin/classes/com/example/anim_4/R$anim.class
anim_4/bin/classes/com/example/anim_4/R$animator.class
anim_4/bin/classes/com/example/anim_4/R$attr.class
anim_4/bin/classes/com/example/anim_4/R$drawable.class
anim_4/bin/classes/com/example/anim_4/R$id.class
anim_4/bin/classes/com/example/anim_4/R$layout.class
anim_4/bin/classes/com/example/anim_4/R$menu.class
anim_4/bin/classes/com/example/anim_4/R$string.class
anim_4/bin/classes/com/example/anim_4/R$style.class
anim_4/bin/classes/com/example/anim_4/R.class
anim_4/bin/classes.dex
anim_4/bin/jarlist.cache
anim_4/bin/res/drawable-hdpi/ic_action_search.png
anim_4/bin/res/drawable-hdpi/ic_launcher.png
anim_4/bin/res/drawable-ldpi/icon1.png
anim_4/bin/res/drawable-ldpi/icon2.png
anim_4/bin/res/drawable-ldpi/icon3.png
anim_4/bin/res/drawable-ldpi/icon4.png
anim_4/bin/res/drawable-ldpi/icon5.png
anim_4/bin/res/drawable-ldpi/icon6.png
anim_4/bin/res/drawable-ldpi/icon7.png
anim_4/bin/res/drawable-ldpi/ic_launcher.png
anim_4/bin/res/drawable-mdpi/ic_action_search.png
anim_4/bin/res/drawable-mdpi/ic_launcher.png
anim_4/bin/res/drawable-xhdpi/ic_action_search.png
anim_4/bin/res/drawable-xhdpi/ic_launcher.png
anim_4/bin/resources.ap_
anim_4/gen/com/example/anim_4/BuildConfig.java
anim_4/gen/com/example/anim_4/R.java
anim_4/ic_launcher-web.png
anim_4/libs/android-support-v4.jar
anim_4/proguard-project.txt
anim_4/project.properties
anim_4/res/anim/list_anim.xml
anim_4/res/animator/list_anim_layout.xml
anim_4/res/drawable-hdpi/ic_action_search.png
anim_4/res/drawable-hdpi/ic_launcher.png
anim_4/res/drawable-ldpi/icon1.png
anim_4/res/drawable-ldpi/icon2.png
anim_4/res/drawable-ldpi/icon3.png
anim_4/res/drawable-ldpi/icon4.png
anim_4/res/drawable-ldpi/icon5.png
anim_4/res/drawable-ldpi/icon6.png
anim_4/res/drawable-ldpi/icon7.png
anim_4/res/drawable-ldpi/ic_launcher.png
anim_4/res/drawable-mdpi/ic_action_search.png
anim_4/res/drawable-mdpi/ic_launcher.png
anim_4/res/drawable-xhdpi/ic_action_search.png
anim_4/res/drawable-xhdpi/ic_launcher.png
anim_4/res/layout/activity_main.xml
anim_4/res/layout/grid_item.xml
anim_4/res/menu/activity_main.xml
anim_4/res/values/strings.xml
anim_4/res/values/styles.xml
anim_4/res/values-v11/styles.xml
anim_4/res/values-v14/styles.xml
anim_4/src/com/example/anim_4/MainActivity.java
anim_4/bin/classes/com/example/anim_4
anim_4/bin/classes/com/example
anim_4/gen/com/example/anim_4
anim_4/src/com/example/anim_4
anim_4/bin/classes/com
anim_4/bin/res/drawable-hdpi
anim_4/bin/res/drawable-ldpi
anim_4/bin/res/drawable-mdpi
anim_4/bin/res/drawable-xhdpi
anim_4/gen/com/example
anim_4/src/com/example
anim_4/bin/classes
anim_4/bin/res
anim_4/gen/com
anim_4/res/anim
anim_4/res/animator
anim_4/res/drawable-hdpi
anim_4/res/drawable-ldpi
anim_4/res/drawable-mdpi
anim_4/res/drawable-xhdpi
anim_4/res/layout
anim_4/res/menu
anim_4/res/values
anim_4/res/values-v11
anim_4/res/values-v14
anim_4/src/com
anim_4/.settings
anim_4/assets
anim_4/bin
anim_4/gen
anim_4/libs
anim_4/res
anim_4/src
anim_4
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.