Browse Source

[공통][Bug] 필터 로딩 타이밍 오류나던 것 수정

hyodong.min 6 năm trước cách đây
mục cha
commit
4565f73bff

+ 6 - 4
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/loading/LoadingCircleView.java

@@ -27,6 +27,8 @@ import kr.co.zumo.app.R;
 public class LoadingCircleView extends ConstraintLayout {
 
   private ObjectAnimator alphaAnimator;
+  private long currentPlayTime;
+  private View circle;
 
   public LoadingCircleView(Context context) {
     super(context);
@@ -41,10 +43,11 @@ public class LoadingCircleView extends ConstraintLayout {
     super(context, attrs, defStyleAttr);
   }
 
+
   public void init(Context context) {
     LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
     inflater.inflate(R.layout.loading_circle_view, this);
-    View circle = findViewById(R.id.loading_circle);
+    circle = findViewById(R.id.loading_circle);
 
     Keyframe kf0 = Keyframe.ofFloat(0f, 1.0f);
     Keyframe kf1 = Keyframe.ofFloat(.5f, 0f);
@@ -60,13 +63,12 @@ public class LoadingCircleView extends ConstraintLayout {
   }
 
   public void setCurrentPlayTime(long currentPlayTime) {
-    if (null != alphaAnimator) {
-      alphaAnimator.setCurrentPlayTime(currentPlayTime);
-    }
+    this.currentPlayTime = currentPlayTime;
   }
 
   public void animationStart() {
     if (null != alphaAnimator) {
+      alphaAnimator.setCurrentPlayTime(currentPlayTime);
       alphaAnimator.start();
     }
   }