闪屏页
来源:互联网 发布:windows平板哪个好 编辑:程序博客网 时间:2024/06/05 15:22
//获取布局文件LinearLayout rlRoot =(LinearLayout)findViewById(R.id.rl_root);//实例化RotateAnimationRotateAnimation animRotate = new RotateAnimation(0,360,Animation.RELATIVE_TO_SELF,o.5f,Animation.RELATIVE_TO_SELF,0.5);//动画旋转animRotate .setDuration(1000);//动画时间animRotate .setFillAfter(ture);//保持动画结束状态//动画缩放ScaleAnimation animScale = new ScaleAnimation(0,1,0,1,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);animaScale.setDuration(1000);animaScale.setFillAfter(ture);//动画渐变AlphaAnimation animaAlpha = new AlphaAnimation(0,1);animaAlpha.setDuration(1000);animaAlpha.setFillAfter(ture);//动画集合AnimationSet set = new AnimationSet(true);set.addAnimation(animaRotate);set.addAnimation(animScale );set.addAnimation(animaAlpha);//启动动画rlRoot.startAnimation(set);set.setAnimationListener(new AnimationListener(){public void onAnimationStart(Animation animation) {}public void onAnimationRepeat(Animation animation) {// TODO Auto-generated method stub}public void onAnimationEnd(Animation animation) {//动画结束,跳转页面//如果是第一次进入,跳新手引导//否则跳转主页面boolean isFirstEnter = prefutils.getBoolean(SplashActivity.this, "is_first_enter", true);Intent intent;if(isFirstEnter ){intent = new Intent(getApplicationContext(),GuideActivity.class);}else{intent = new Intent(getApplicationContext(),MainActivity.class);}startActivity(intent);finish();}});
0 0
- 闪屏页
- 闪屏页
- 闪屏页
- 闪屏页开发
- 动画闪屏页
- swift闪屏页
- 闪屏页实现
- 设置自定义闪屏页
- 设置闪屏页时间延迟
- 安卓之闪屏页
- react-native-闪屏页
- Splash闪屏页的使用方法
- android从零开始-闪屏页
- 闪屏页的实现笔记
- 闪屏页工具类
- Android闪屏页实现
- Splash 闪屏页开发
- 闪屏页的初级实现
- HTTP通讯请求工具包
- How to show or hide filename extensions on Mac
- 详解coredump
- webpack tpl 模板编译的桥梁 tpl-lite-loader
- 基于Selenium一键写CSDN博客
- 闪屏页
- Permutations
- 使用Ophcrack破解系统Hash密码
- GDB十分钟教程(转载自Liigo老师)
- sharePreference封装
- jQuery,DOM相关
- 面试题25:二叉树中和为某一值的路径
- 区间相交问题
- 软件测试计划和测试方案的区别(领域软件测试网)