//动画集合
AnimationSet animationSet = new AnimationSet(true);
//alpha动画
Animation animation = new AlphaAnimation(0.0f,1.0f);
animation.setDuration(1300);
animationSet.addAnimation(animation);
//位移动画 效果 从Y方向下落到自己的位置
//RELATIVE_TO_SELF 相对自身
//-1.0f 起始Y坐标为自身的高度
//TranslateAnimation(int fromXType, float fromXValue,
// int toXType, float toXValue,
// int fromYType, float fromYValue,
// int toYType, float toYValue)
animation = new TranslateAnimation(
Animation.RELATIVE_TO_SELF,0.0f,Animation.RELATIVE_TO_SELF,0.0f,
Animation.RELATIVE_TO_SELF,-1.0f,Animation.RELATIVE_TO_SELF,0.0f);
animation.setDuration(1300);
animationSet.addAnimation(animation);
//设置子视图动画及持续时间
LayoutAnimationController controller = new LayoutAnimationController(animationSet,0.5f);
//绑定到listview
mListView.setLayoutAnimation(controller);

为listview的item添加动画效果的更多相关文章

  1. Java 给PPT添加动画效果(预设动画/自定义动画)

    PPT幻灯片中对形状可设置动画效果,常见的动画效果为内置的固定类型,即动画效果和路径是预先设定好的固定模板,但在设计动画效果时,用户也可以按照自己的喜好自定义动画动作路径.下面,通过Java后端程序代 ...

  2. ListView中内容的动画效果

    LayoutAnimationController用于为一个layout里面的控件,或者是一个ViewGroup里面的控件设置动画效果,可以在XML文件中设置,亦可以在Java代码中设置. 一种直接在 ...

  3. PopupWindow添加动画效果

    1.定义PopupWindow弹出与消失的两个动画文件,放在anim文件夹下 popup_enter.xml <?xml version="1.0" encoding=&qu ...

  4. 给Activity切换过程添加动画效果

    首先,在资源文件中定义一些动画效果 例如: <scale android:duration="@android:integer/config_mediumAnimTime" ...

  5. 网站滑到指定的位置给div添加动画效果

    <!DOCTYPE html> <html> <head> <style> .anim-show { width:100px; height:100px ...

  6. 114自定义UITableViewCell(扩展知识:为UITableViewCell添加动画效果)

    关键操作: 效果如下: ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UITableViewCo ...

  7. android中listview的item滑动删除效果(已解决listview点击问题)

    领导看到iphone上tableview有个滑动删除的效果,要求在android上也实现,搜了下资料,实现起来比较简单,可弄到后面,居然不能点击了,把一篇文章中的代码修改了一下,捣鼓了一番,搞定,下面 ...

  8. html5+css3画太极并添加动画效果

    可兼容移动端视图 效果图如下:太极图是可以旋转的 具体实现如下: <!DOCTYPE html> <html lang="zh"> <head> ...

  9. Android开发UI之给ListView设置布局动画效果

    1.通过JAVA代码添加,资源文件基本上不修改 XML文件,只添加了一个ListView,就不贴XML文件的代码了. java代码: public class MainActivity extends ...

随机推荐

  1. java 之return

    return关键词有两个用法,一方面制定一个方法返回什么值,另一方面导致当前方法退出.

  2. linux下普通用户如何使用80端口启动程序

    linux下普通用户如何使用80端口启动程序 http://blog.csdn.net/shootyou/article/details/6750230 大家都知道默认情况下linux的1024以下端 ...

  3. Git过滤文件和文夹

    今天是2016年10月份的最后一天,感觉时间过得真的是飞快呢,此刻天下着小雨,天气灰蒙如天每个人的心情一样.在此把这个月的项目上传到git上,就需要过滤一些项目自动生成的不必要的文件,如:bin,ob ...

  4. C#获取网页的HTML码、下载网站图片、获取IP地址

    1.根据URL请求获取页面HTML代码 /// <summary> /// 获取网页的HTML码 /// </summary> /// <param name=" ...

  5. hp安装oracle报错解决

    hpux上安装oracle 11gR2刚开始报错:集群验证框架内部发生了错误 解决办法http://www.it165.net/database/html/201509/14181.html 将文件后 ...

  6. DIY PIXHAWK APM等飞控用的声纳

    代码: SR04 + ApmSonar.ino 打包下载 注意,使用到了SR04的类库. ApmSonar.ino // sr04 to apm I2c sonar // by panxu mail: ...

  7. 1393: Robert Hood 旋转卡壳 凸包

    http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1393 http://poj.org/problem?id=2187 Beauty Contest ...

  8. 【Python学习】函数参数传递方法四种(位置,关键字,默认值,包裹位置,包裹关键字传递)

    1. 位置传递: #--coding:utf-8-- def send(name,address): return 'package is sent to %s, located in %s' %(n ...

  9. 6周学习计划,攻克JavaScript难关(React/Redux/ES6 etc.)

    作者:余博伦链接:https://zhuanlan.zhihu.com/p/23412169来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 和大家一样,最近我也看了Jo ...

  10. Ajax UI方面的处理方式

    一种方式: 从远程直接获取HTML加载到本地 第二种方式从远程获取JSON,到本地使用JS处理数据. var html = "<table cellspacing=\"0\& ...