1.先導入函示庫(build.gradle: Project)
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
2.先導入函示庫(build.gradle: Module)
dependencies {
implementation 'com.github.Cutta:LoadingImagesAnimation:1.1'
}
3.values下的strings添加Array
<integer-array name="girl">
<item>@drawable/b11</item>
<item>@drawable/b12</item>
<item>@drawable/b13</item>
<item>@drawable/b14</item>
</integer-array>
4.XML
<com.cunoraz.loadingimages.LoadingImagesView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:imagesArray="@array/girl" //要撥放的array
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
5.效果展現