You can use an animated gif with this ready-made animation and load it into an ImageView just like any other image. You can use Glide's library for this. Example:
Glide.with(this)
.load(R.drawable.gifanimation2)
.asGif()
.into(image_view);
Do not forget to add the Glide dependency in build.gradle:
dependencies {
compile 'com.github.bumptech.glide:glide:3.7.0'
}
When processing is finished, you exchange the animated gif with a static image in the return callback.