Android:启动界面动图效果
步骤:
- 在欢迎界面布局中设定一个ImageView组件,大小为整个屏幕大小
- 利用图片加载框架Glide加载动图
- 创建Timer定时器,为他指定调度任务TimerTask,用schedule方法,在指定的延迟之后安排指定的任务执行。
详解
1. 布局文件:Activity_welcome.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:layout_height="match_parent">
<ImageView
android:id="@+id/welcome_gif"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"/>
</LinearLayou