Android 开场渐变动画
来源:互联网 发布:知春路北航致真大厦 编辑:程序博客网 时间:2024/04/19 19:20
下面是动画XML文件:
<?xml version="1.0" encoding="utf-8"?><alpha xmlns:android="http://schemas.android.com/apk/res/android" android:fromAlpha="1.0" android:toAlpha="0.2" android:duration="3000" android:interpolator="@android:anim/accelerate_interpolator"></alpha>
在onCreate函数中加入如下代码:
animation = AnimationUtils.loadAnimation(this, R.anim.init_anim); //建立一个动画 img = (ImageView) findViewById(R.id.init_img); //App开张图片 //为动画设置监听 animation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { initData(); } @Override public void onAnimationEnd(Animation animation) { Intent intent = new Intent(InitActivity.this, MainActivity.class); intent.putExtra("jsonStr", jsonstr); intent.putExtra("jsonstr2", jsonstr2); startActivity(intent); InitActivity.this.finish(); } @Override public void onAnimationRepeat(Animation animation) { } }); img.setAnimation(animation); //这行代码很关键,就是为谁添加动画
FR:海涛高软(QQ技术群:386476712)
1 0
- Android 开场渐变动画
- Android开场透明度渐变动画
- Android APP如何做开场渐变动画
- Android开场动画源码
- Android的基础开场动画
- Android--制作开场动画/MediaPlayer.OnCompletionListener
- android开场动画splash的实现
- Android App开场图片动画的实现
- android 渐变动画
- Android 动画 - AlphaAnimation渐变动画
- Android中心渐变动画XML
- Android-alpha-渐变透明度 动画
- android studio 按钮渐变动画
- android中颜色渐变动画
- android动画,旋转,渐变,缩放
- Android-实现背景渐变动画
- qq空间开场动画代码
- iOS-OC-APP开场动画
- 免安装版MySql安装配置
- Find the Duplicate Number
- spring mvc静态资源拦截问题
- mock.js的使用方法,前后端的分离
- 向maven仓库中安装本地jar包
- Android 开场渐变动画
- java resources 红叉
- ffmpeg处理RTMP流媒体的命令大全
- 使用JSON需要的jar包
- Spring中事务管理的不同时机切入调用
- 【27.66%】【codeforces 592D】Super M
- 获取ImageView中图片的坐标
- 中小企业如何建立商业智能
- debain--apache配置