文件名称:android_LayoutAnimationController

  • 所属分类:
  • android开发
  • 资源属性:
  • [Java] [源码]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 1.46mb
  • 下载次数:
  • 0次
  • 提 供 者:
  • wu***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

如果我们需要一个界面中的多个控件按照相同的动画方式但是每个控件完成该动画的时刻不同的话,就可采用本节讲的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

anim_4\.classpath

......\.project

......\.settings\org.eclipse.jdt.core.prefs

......\AndroidManifest.xml

......\bin\AndroidManifest.xml

......\...\anim_4.apk

......\...\classes\com\example\anim_4\BuildConfig.class

......\...\.......\...\.......\......\MainActivity.class

......\...\.......\...\.......\......\R$anim.class

......\...\.......\...\.......\......\R$animator.class

......\...\.......\...\.......\......\R$attr.class

......\...\.......\...\.......\......\R$drawable.class

......\...\.......\...\.......\......\R$id.class

......\...\.......\...\.......\......\R$layout.class

......\...\.......\...\.......\......\R$menu.class

......\...\.......\...\.......\......\R$string.class

......\...\.......\...\.......\......\R$style.class

......\...\.......\...\.......\......\R.class

......\...\classes.dex

......\...\jarlist.cache

......\...\res\drawable-hdpi\ic_action_search.png

......\...\...\.............\ic_launcher.png

......\...\...\.........ldpi\icon1.png

......\...\...\.............\icon2.png

......\...\...\.............\icon3.png

......\...\...\.............\icon4.png

......\...\...\.............\icon5.png

......\...\...\.............\icon6.png

......\...\...\.............\icon7.png

......\...\...\.............\ic_launcher.png

......\...\...\.........mdpi\ic_action_search.png

......\...\...\.............\ic_launcher.png

......\...\...\.........xhdpi\ic_action_search.png

......\...\...\..............\ic_launcher.png

......\...\resources.ap_

......\gen\com\example\anim_4\BuildConfig.java

......\...\...\.......\......\R.java

......\ic_launcher-web.png

......\libs\android-support-v4.jar

......\proguard-project.txt

......\project.properties

......\res\anim\list_anim.xml

......\...\....ator\list_anim_layout.xml

......\...\drawable-hdpi\ic_action_search.png

......\...\.............\ic_launcher.png

......\...\.........ldpi\icon1.png

......\...\.............\icon2.png

......\...\.............\icon3.png

......\...\.............\icon4.png

......\...\.............\icon5.png

......\...\.............\icon6.png

......\...\.............\icon7.png

......\...\.............\ic_launcher.png

......\...\.........mdpi\ic_action_search.png

......\...\.............\ic_launcher.png

......\...\.........xhdpi\ic_action_search.png

......\...\..............\ic_launcher.png

......\...\layout\activity_main.xml

......\...\......\grid_item.xml

......\...\menu\activity_main.xml

......\...\values\strings.xml

......\...\......\styles.xml

......\...\......-v11\styles.xml

......\...\.........4\styles.xml

......\src\com\example\anim_4\MainActivity.java

......\bin\classes\com\example\anim_4

......\...\.......\...\example

......\gen\com\example\anim_4

......\src\com\example\anim_4

......\bin\classes\com

......\...\res\drawable-hdpi

......\...\...\drawable-ldpi

......\...\...\drawable-mdpi

......\...\...\drawable-xhdpi

......\gen\com\example

......\src\com\example

......\bin\classes

......\...\res

......\gen\com

......\res\anim

......\...\animator

......\...\drawable-hdpi

......\...\drawable-ldpi

......\...\drawable-mdpi

......\...\drawable-xhdpi

......\...\layout

......\...\menu

......\...\values

......\...\values-v11

......\...\values-v14

......\src\com

......\.settings

......\assets

......\bin

......\gen

......\libs

......\res

......\src

anim_4

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org