淡入淡出动画效果

   android:fromAlpha="1.0f"         //起始透明度

   android:toAlpha="0.0f"             //结束透明度

   android:duration="500"           //动画持续时间(单位ms)


 渐变尺寸伸缩动画效果

   android:fromXScale="1.0"android:toXScale="1.4"    //水平拉伸

   android:fromYScale="1.0"    android:toYScale="0.6"     //垂直压缩


水平和/或垂直运动

三种表示格式:

   1.-100% 到 100% 相对自身的百分比

   2.-100%P到100%P 相对父组件的百分比

   3.folat value 没有后缀 表示绝对值


   android:fromXDelta="100%p"   android:toXDelta="0"  //从父组件的右边界到中间


旋转动画

   android:fromDegrees="0"      //起始角度

   android:toDegrees="-45"      //结束角度    负数表示逆时针

 

多动画组合

 

//初始化 Translate动画   

translateAnimation = new TranslateAnimation(0.1f, 100.0f,0.1f,100.0f);  

//初始化 Alpha动画   

alphaAnimation = new AlphaAnimation(0.1f, 1.0f);  

  

//动画集   

AnimationSet set = new AnimationSet(true);  

set.addAnimation(translateAnimation);  

set.addAnimation(alphaAnimation);  

 

//设置动画时间 (作用到每个动画)   

set.setDuration(1000);  

this.startAnimation(set);  


更多相关文章

  1. Android(安卓)Animation无限循环动画
  2. Android各控件常用属性
  3. Android(安卓)用ViewFlipper实现各种切换动画
  4. android:id设置的三种方式
  5. Android:Material Design(七) 兼容性
  6. Android:Material Design(三) 动画
  7. Android技能树 — 屏幕适配小结
  8. Android(安卓)Button 常用属性设置,圆角,边框,点击事件
  9. Android(安卓)Button 常用属性设置,圆角,边框,点击事件

随机推荐

  1. android:editable is deprecated: Use an
  2. appium 【已解决】Android,每次启动手机中
  3. android8.0 otg链接u盘,相册里面的内容没
  4. Mac安装android studio后卡在building gr
  5. 使用AndServer在Android上搭建Web服务器
  6. Android Graphics - 1 概述
  7. Anatomy of an Android Application(中文
  8. Android简明开发教程十一:自定义Adapter显
  9. Android 短信窃听器
  10. 2011.10.12——— android 关于canvas.tr