Animation的使用方法并不难。这里简单的介绍一下使用方法。
先看效果图:
效果还是不错的吧。 下面来看看使用方法。
动画效果是通过Animation来实现的,一共有四种,分别为:
AlphaAnimation : 渐变透明度动画
ScaleAnimation: 尺寸渐变动画
TranslateAnimation: 水平移动动画
RotateAnimation: 旋转动画
那么为了实现我的效果图上的效果呢。我们所有的动画都使用到了。
首先我们在Activity的布局文件中加入一个ImageView和一个TextView,使他们在布局居中。
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"