博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android ListView Animation 布局动画
阅读量:2307 次
发布时间:2019-05-09

本文共 1119 字,大约阅读时间需要 3 分钟。

AnimationSet set = new AnimationSet(false);      Animation animation = new AlphaAnimation(0,1);   //AlphaAnimation 控制渐变透明的动画效果      animation.setDuration(500);     //动画时间毫秒数      set.addAnimation(animation);    //加入动画集合            animation = new TranslateAnimation(1, 13, 10, 50);  //ScaleAnimation 控制尺寸伸缩的动画效果      animation.setDuration(300);      set.addAnimation(animation);            animation = new RotateAnimation(30,10);    //TranslateAnimation  控制画面平移的动画效果      animation.setDuration(300);      set.addAnimation(animation);            animation = new ScaleAnimation(5,0,2,0);    //RotateAnimation  控制画面角度变化的动画效果      animation.setDuration(300);      set.addAnimation(animation);            LayoutAnimationController controller = new LayoutAnimationController(set, 1);                  GridView gridView = (GridView) this.findViewById(R.id.gridview);      gridView .setLayoutAnimation(controller);  //GridView 设置动画效果            ListView listview= (ListView)this.findViewById(R.id.listview);      listview.setLayoutAnimation(controller);   //ListView 设置动画效果

 

转载于:https://www.cnblogs.com/HelloGuang/p/3841281.html

你可能感兴趣的文章
笔记2013.09.17
查看>>
笔记2013.09.18
查看>>
Android Studio入门之常见问题
查看>>
Android札记
查看>>
BerkeleyDB--备份机制
查看>>
使用core文件调试程序
查看>>
FastDFS学习日志
查看>>
GIGA+调研
查看>>
Atime/Mtime/Ctime
查看>>
superblock,dentry,inode浅析(译转)
查看>>
key-value数据库
查看>>
ceph学习(一)——数据结构
查看>>
文件系统性能测试工具
查看>>
/proc/sys/vm/优化
查看>>
linux系统性能调优第一步——性能分析(vmstat)
查看>>
kswapd0 swap管理器,kjournald ext3日志进程,pdflush
查看>>
MongoDB vs Redis vs Tokyo Tyrant
查看>>
debug日志
查看>>
makefile学习笔记
查看>>
系统rm的处理机制
查看>>