开发步骤:
1.创建一个通过手势滑动查看相片的手机相册
2.创建动画资源文件
3.定义并初始化动画数组
4.指定切换的动画效果
第一步:创建像片切换器
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<!--图像切换器-->
<ViewFlipper
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/flipper">
</ViewFlipper>
</RelativeLayout>
第二步:创建动画资源文件
res->anim->anim_alpha_in.xml 淡入动画
<?xml vers