android 对gif图片的简单使用记录
更新:HHH   时间:2023-1-7


首先在build.gradle文件中添加

compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.17'

然后同步



然后在layout的xml文件中使用

<pl.droidsonroids.gif.GifImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:onClick="JustTest"
    android:src="@drawable/loading"
    />

上面的控件中的

android:src
android:background

都可以是gif图片文件


返回移动开发教程...