帧动画
来源:互联网 发布:ubuntu邮件服务器 编辑:程序博客网 时间:2024/06/14 06:01
以前真没有见过,这次算是涨姿势了,原来帧动画是长这样子、
放到了drawable里面,直接拿来用的
<?xml version="1.0" encoding="utf-8"?><animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false"> <item android:drawable="@drawable/app_loading0" android:duration="150" /> <item android:drawable="@drawable/app_loading1" android:duration="150" /> <item android:drawable="@drawable/app_loading2" android:duration="150" /> <item android:drawable="@drawable/app_loading3" android:duration="150" /></animation-list>
<!--加载中..--> <LinearLayout android:id="@+id/ll_progress_bar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_marginTop="80dp" android:gravity="center_vertical"> <ImageView android:id="@+id/img_progress" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/anim_list" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="努力加载中..." android:textColor="@color/colorTabText" android:textSize="14sp" /> </LinearLayout>
protected LinearLayout ll_progress_bar; protected ImageView img_progress; // 动画 private AnimationDrawable mAnimationDrawable;
private void findId() { ll_error_refresh = (LinearLayout) view.findViewById(R.id.ll_error_refresh); img_err = (ImageView) view.findViewById(R.id.img_err); ll_progress_bar = (LinearLayout) view.findViewById(R.id.ll_progress_bar); img_progress = (ImageView) view.findViewById(R.id.img_progress); }
使用方法:
mAnimationDrawable = (AnimationDrawable) img_progress.getDrawable();mAnimationDrawable.start();
mAnimationDrawable.stop();ll_progress_bar.setVisibility(View.GONE);
0 0
- 动画__帧动画
- 转场动画 帧动画
- 动画 AnimationDrawable 帧动画
- 动画----帧动画
- 安卓补间动画、帧动画
- Android动画-帧动画
- Android动画--帧动画
- egret_gif动画(帧动画)
- android动画 -- 帧动画 补间动画
- 属性动画,补间动画,帧动画
- View动画、帧动画、属性动画
- Android动画-帧动画&补间动画
- Android加载动画 旋转动画 、帧动画
- 帧动画、补间动画、属性动画
- 动画(过渡动画、关键帧动画)
- Android动画-帧动画-属性动画
- 帧动画&补间动画&属性动画
- 安卓 动画帧动画基础动画
- ubuntu 更新时出现校验和不符 的一种解决办法
- 我的第一个WordPress
- jquery事件总结
- 微服务实战(一):微服务架构的优势与不足
- ssh学习笔记
- 帧动画
- problem b
- 349. Intersection of Two Arrays/350. Intersection of Two Arrays II
- ubuntu14设置在当前目录打开终端
- 神兵利器之Axure8.0基础进阶
- linux关闭防火墙
- Building Android for Qemu: A Step-by-Step Guide
- CentOS7挂载windows下的共享文件夹
- Precompiling APK Files During Android AOSP Build