android 的布局 动画,就是 布局的时候的动画,不会控件自身的动画。

好吧,直接上代码:

@Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);LayoutInflater la = LayoutInflater.from(this);LinearLayout view = (LinearLayout) la.inflate(R.layout.activity_main,null);ScaleAnimation sc = new ScaleAnimation(0, 1, 0, 1);sc.setDuration(4300);LayoutAnimationController lac = new LayoutAnimationController(sc, 0.5f);// 上一个子控件动了一半的时候,后面开始动lac.setOrder(LayoutAnimationController.ORDER_REVERSE);// 从小向上的动画,其他资金试view.setLayoutAnimation(lac);setContentView(view);}
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    xmlns:tools="http://schemas.android.com/tools"    android:layout_width="match_parent"    android:layout_height="match_parent"    android:orientation="vertical" >    <Button        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="@string/hello_world" />    <Button        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="@string/hello_world" />    <Button        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="@string/hello_world" />    <Button        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="@string/hello_world" />    <Button        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="@string/hello_world" /></LinearLayout>

直接运行上面的代码就可以了,吊炸天的动画,可以做出各种吊的东东

更多相关文章

  1. Android开发之如何手写代码进行页面布局
  2. android 自定义dialog,窗口动画,
  3. Android 自定义控件 ViewPager头部指示器控件 ViewPagerBelowInd
  4. android的 重要控件使用篇
  5. Android 控件TextView的属性
  6. Android组合控件自定义标题栏
  7. android 动态改变控件大小的方法
  8. androin各类动画效果实现
  9. android 日历控件

随机推荐

  1. mysql的级联复制和多源复制
  2. mysql的sql_mode设置
  3. MySQL-MHA集群部署(binlog复制)
  4. MySQL备份与恢复-mydumper
  5. 哪个同步盘最实用
  6. 哪个同步盘好一些
  7. Linux内存、Swap、Cache、Buffer详细解析
  8. 从键盘输入若干个学生成绩,输入负数作为输
  9. js基础知识:字符串数组方法及留言本实例
  10. 键盘输入10 个数,输出最大值和最小值及其