android动画效果,使用animation
2013-04-01 18:08
429 查看
android animation
动画,边旋转边放大
左侧移入
右侧移入
代码:
动画,边旋转边放大
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <scale android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:repeatCount="0" android:fromXScale="0.5" android:fromYScale="0.5" android:toXScale="1.0" android:toYScale="1.0" android:pivotX="50%" android:pivotY="50%" android:fillAfter="true" android:duration="800"/> <rotate android:interpolator="@android:anim/accelerate_interpolator" android:repeatCount="0" android:fromDegrees="0" android:toDegrees="+1080" android:pivotX="50%" android:pivotY="50%" android:duration="700" /> </set>
左侧移入
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromXDelta="-318" android:fromYDelta="0" android:toXDelta="0" android:toYDelta="0" android:duration="700" android:fillAfter="true"/> </set>
右侧移入
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromXDelta="318" android:toXDelta="0" android:toYDelta="0" android:duration="700" android:fillAfter="true"/> </set>
代码:
Animation animation = AnimationUtils.loadAnimation(context, rotateAnimationXmlId); animation.setInterpolator(new AccelerateDecelerateInterpolator()); ImageView imageView = (ImageView) findViewById(rotateImageId); imageView.startAnimation(animation);
相关文章推荐
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- android 视图动画的使用,Animation重写 实现旋转效果
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android控件的动画效果的实现及其AnimationListener和Interpolator的使用方法
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android控件的动画效果的实现及其AnimationListener和Interpolator的使用方法
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android Animation Tween动画效果的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android中使用Animation实现控件的动画效果以及Interpolator和AnimationListener的使用
- Android 动画效果 --Animation 动画