Added setting to disable image animation

This commit is contained in:
M66B
2023-11-12 12:08:15 +01:00
parent a041d57814
commit b38fe9e4ff
6 changed files with 46 additions and 21 deletions

View File

@@ -25,7 +25,6 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.AnimatedImageDrawable;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.pdf.PdfRenderer;
@@ -185,9 +184,7 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
else
ivImage.setImageDrawable(image);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P &&
image instanceof AnimatedImageDrawable)
((AnimatedImageDrawable) image).start();
ImageHelper.animate(context, image);
StringBuilder sb = new StringBuilder();