Merge branch 'r' into qa_light
This commit is contained in:
@@ -5,11 +5,12 @@ import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
|
||||
public class V2XAnimationManager implements Animation {
|
||||
|
||||
private static final String TAG = "V2XAnimationManager";
|
||||
private ImageView targetImageView;
|
||||
private ProgressBar targetImageView;
|
||||
private boolean isStarted = false;
|
||||
|
||||
private int mStartIndex = 0;
|
||||
@@ -24,7 +25,7 @@ public class V2XAnimationManager implements Animation {
|
||||
switch ( msg.what ) {
|
||||
case MSG_LOOP:
|
||||
if ( isStarted ) {
|
||||
targetImageView.setImageResource( AnimationResources.loadingRes[mStartIndex++ % AnimationResources.loadingRes.length] );
|
||||
// targetImageView.setImageResource( AnimationResources.loadingRes[mStartIndex++ % AnimationResources.loadingRes.length] );
|
||||
mHandler.sendEmptyMessageDelayed( MSG_LOOP, INTERVAL );
|
||||
}
|
||||
break;
|
||||
@@ -32,7 +33,7 @@ public class V2XAnimationManager implements Animation {
|
||||
}
|
||||
};
|
||||
|
||||
public void animationWithTarget(ImageView imageView, int[] resources, int duration) {
|
||||
public void animationWithTarget(ProgressBar imageView, int[] resources, int duration) {
|
||||
targetImageView = imageView;
|
||||
INTERVAL = duration;
|
||||
start();
|
||||
|
||||
Reference in New Issue
Block a user