你好,游客 登录 注册 搜索
背景:
阅读新闻

用Animation动画实现Android应用的欢迎界面

[日期:2012-02-22] 来源:Linux社区  作者:Linux [字体:大 中 小]
动画welcome_alpha.xml
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <set xmlns:Android="http://schemas.android.com/apk/res/android"  
  3.     android:interpolator="@android:anim/accelerate_interpolator">  
  4.     <alpha    
  5.         android:fromAlpha="0.0"  
  6.         android:toAlpha="1.0"  
  7.         android:duration="2000"    
  8.         />  
  9.     <alpha    
  10.         android:fromAlpha="1.0"  
  11.         android:toAlpha="0.0"  
  12.         android:startOffset="3000" //延迟3秒再开始   
  13.         android:duration="3000"    
  14.         />  
  15. </set>  

布局welcome.xml

  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  3.     android:layout_width="fill_parent"  
  4.     android:layout_height="fill_parent"  
  5.     android:orientation="vertical"    
  6.     android:gravity="center_vertical|center_horizontal">  
  7.     <ImageView  
  8.         android:id="@+id/welcome_image_view"    
  9.         android:layout_width="wrap_content"  
  10.         android:layout_height="wrap_content"  
  11.         android:src="@drawable/welcome"  
  12.         />  
  13. </LinearLayout>  
linux
相关资讯       Android开发 
本文评论   查看全部评论 (1)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 1 楼
* 匿名 发表于 2013/8/2 23:04:50
太棒了!正好用到!谢谢!