android_LayoutAnimationController

所属分类:android开发
开发工具:Java
文件大小:1498KB
下载次数:42
上传日期:2012-08-07 10:11:17
上 传 者tornadomeet
说明:  如果我们需要一个界面中的多个控件按照相同的动画方式但是每个控件完成该动画的时刻不同的话,就可采用本节讲的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.)

文件列表:
Android开发历程_10(LayoutAnimationController的初步使用).docx (74747, 2012-08-07)
anim_4\.classpath (364, 2012-08-06)
anim_4\.project (842, 2012-08-06)
anim_4\.settings\org.eclipse.jdt.core.prefs (177, 2012-08-06)
anim_4\AndroidManifest.xml (794, 2012-08-06)
anim_4\bin\AndroidManifest.xml (794, 2012-08-06)
anim_4\bin\anim_4.apk (355387, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\BuildConfig.class (345, 2012-08-06)
anim_4\bin\classes\com\example\anim_4\MainActivity.class (2600, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R$anim.class (393, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R$animator.class (412, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R$attr.class (340, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R$drawable.class (650, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R$id.class (488, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R$layout.class (436, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R$menu.class (397, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R$string.class (513, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R$style.class (395, 2012-08-07)
anim_4\bin\classes\com\example\anim_4\R.class (725, 2012-08-07)
anim_4\bin\classes.dex (320632, 2012-08-07)
anim_4\bin\jarlist.cache (119, 2012-08-07)
anim_4\bin\res\drawable-hdpi\ic_action_search.png (409, 2012-08-06)
anim_4\bin\res\drawable-hdpi\ic_launcher.png (4129, 2012-08-06)
anim_4\bin\res\drawable-ldpi\icon1.png (23506, 2012-08-06)
anim_4\bin\res\drawable-ldpi\icon2.png (83081, 2012-08-06)
anim_4\bin\res\drawable-ldpi\icon3.png (8850, 2012-08-06)
anim_4\bin\res\drawable-ldpi\icon4.png (28173, 2012-08-06)
anim_4\bin\res\drawable-ldpi\icon5.png (12145, 2012-08-06)
anim_4\bin\res\drawable-ldpi\icon6.png (21045, 2012-08-06)
anim_4\bin\res\drawable-ldpi\icon7.png (18897, 2012-08-06)
anim_4\bin\res\drawable-ldpi\ic_launcher.png (1756, 2012-08-06)
anim_4\bin\res\drawable-mdpi\ic_action_search.png (311, 2012-08-06)
anim_4\bin\res\drawable-mdpi\ic_launcher.png (2654, 2012-08-06)
anim_4\bin\res\drawable-xhdpi\ic_action_search.png (491, 2012-08-06)
anim_4\bin\res\drawable-xhdpi\ic_launcher.png (5456, 2012-08-06)
anim_4\bin\resources.ap_ (218948, 2012-08-07)
anim_4\gen\com\example\anim_4\BuildConfig.java (160, 2012-08-06)
anim_4\gen\com\example\anim_4\R.java (1940, 2012-08-07)
anim_4\ic_launcher-web.png (37099, 2012-08-06)
anim_4\libs\android-support-v4.jar (337562, 2012-08-06)
... ...

近期下载者

相关文件


收藏者