有关动画
来源:互联网 发布:南京魔苹网络怎么样 编辑:程序博客网 时间:2024/05/16 15:56
渐变动画(模拟欢迎界面):
public class WelcomeActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.welcome); //图片渐变模糊度始终 AlphaAnimation aa = new AlphaAnimation(0.1f, 1.0f); //渐变时间 aa.setDuration(5000); //展示图片渐变动画 this.findViewById(R.id.welcomeImage).startAnimation(aa); //渐变过程监听 aa.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { System.out.println("动画开始..."); } @Override public void onAnimationRepeat(Animation animation) { System.out.println("动画重复..."); } @Override public void onAnimationEnd(Animation animation) { System.out.println("动画结束..."); Intent intent = new Intent(WelcomeActivity.this, MainActivity.class); startActivity(intent); } }); }}
welcome.xml文件:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:id="@+id/welcomeImage" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@mipmap/welcome"/></LinearLayout>
0 0
- 有关动画
- 有关动画的总结
- 有关animation抽屉动画示例
- 有关popupwindow的动画效果
- 有关动画的一些总结
- c#:与定时器有关的动画效果
- 有关BlackBerry 5.0上的屏幕切换动画.
- CSS3中和动画有关的属性transform、transition 和 animation
- 有关ViewFlipper的使用及设置动画效果的讲解
- VC++6.0中窗口动画的有关处理
- CSS3中和动画有关的属性transform、transition 和 animation
- CoreAnimation详解(一)有关Layer的动画
- 有关动画的code(2中 以后慢慢添加)
- iOS中 有关动画与图像处理的一些笔记
- CSS3中和动画有关的属性transform、transition 和 animation
- 有关ios过度动画CATransition的一些特效
- 有关ViewFlipper的使用及设置动画效果的讲解
- 有关Property Animation(属性动画)的基本用法
- (Fusions) XmlParser.getXmlData(fusionFile, Fusions.class);
- UIView控件的一些常用方法和简单动画设置
- 手机存储详解
- php转码
- log4j 配置学习
- 有关动画
- 微信公众号号开发指南
- LinkedList的实现原理与总结
- SODBASE CEP学习(十二):规则模板、阈值和用户界面
- android MSM8974 上DeviceTree简介
- 远程服务器监控工具rtop安装和使用小结
- 第9周项目5 方程也是类
- GridView异步展示图片实现单个item刷新
- 【.Net码农】XAML资源入门