Android开发--图形图像与动画(四)--AnimationListener简介
就像Button控件有监听器一样,动画效果也有监听器,只需要实现AnimationListener就可以实现对动画效果的监听,其中需要重载三个函数,就是下面的这几个函数:
具体的实现代码如下:<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" android:id="@+id/viewGroup" > <Button android:id="@+id/button_add" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_x="0dp" android:layout_y="367dp" android:text="添加图片" /> <Button android:id="@+id/button_delete" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_x="0dp" android:layout_y="410dp" android:text="删除图片" /> <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_x="153dp" android:layout_y="155dp" android:src="@drawable/ic_launcher" /></AbsoluteLayout>