UI
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.v2x.utils.animation;
|
||||
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@@ -9,6 +10,7 @@ import com.mogo.utils.UiThreadHandler;
|
||||
|
||||
public class V2XAnimationManager implements Animation {
|
||||
|
||||
private static final String TAG = "V2XAnimationManager";
|
||||
private ImageView targetImageView;
|
||||
private Animation delegate;
|
||||
private boolean isStarted = false;
|
||||
@@ -18,6 +20,7 @@ public class V2XAnimationManager implements Animation {
|
||||
ThreadPoolService.execute(() -> {
|
||||
final AnimationDrawable drawable = new AnimationDrawable();
|
||||
for (int i = 0; i < resources.length; i++) {
|
||||
drawable.setOneShot(false);
|
||||
drawable.addFrame(targetImageView.getResources().getDrawable(resources[i]), duration);
|
||||
}
|
||||
UiThreadHandler.post(() -> {
|
||||
@@ -48,6 +51,7 @@ public class V2XAnimationManager implements Animation {
|
||||
}
|
||||
|
||||
public void release() {
|
||||
|
||||
delegate = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user