|
|
@@ -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();
|
|
|
}
|
|
|
}
|