Код: Выделить всё
public class CustomImageView extends ImageView {
public CustomImageView(Context context) {
super(context);
}
public void startAnimation(List arrBitmapDelay, int[] durations) {
if (arrBitmapDelay.size() > 1 && arrBitmapDelay.size() == durations.length) {
final AnimationDrawable oAnimation = new AnimationDrawable();
oAnimation.setOneShot(false);
int i = 0;
for (BitmapDrawable oBitmapDelay : arrBitmapDelay) {
oAnimation.addFrame(oBitmapDelay, durations[i]);
i++;
}
if(getContext() instanceof Activity)
if(((Activity)getContext()).isFinishing())
return;
if(oAnimation.getNumberOfFrames() Я добавляю код списка чтения растровый карту. < /p>
[code]public void decodeAndShow() {
List bitmaps = new ArrayList();
int[] duration = new int[20];
for (int i=0; i
Подробнее здесь: [url]https://stackoverflow.com/questions/33031483/android-animationdrawable-flashing-white-hole-while-playing-a-custom-bitmap-dr[/url]