Android动画_ScaleAnimation

ScaleAnimation: 进行放大缩小的动画效果。


代码方式:

ScaleAnimation sAnima = new ScaleAnimation(0, 5, 0, 5);
sAnima.setDuration(2000);

view.startAnimation(sAnima);

xml方式:

<?xml version="1.0" encoding="utf-8"?>
<scale xmlns:android="http://schemas.android.com/apk/res/android"
    android:fromXScale="0"
    android:toXScale="3"
    android:fromYScale="0"
    android:toYScale="8"
    android:duration="2000">

</scale>


猜你喜欢

转载自blog.csdn.net/kingdam578/article/details/50148771