bz.java 2.97 KB
import android.annotation.TargetApi;
import android.support.annotation.RequiresApi;
import android.support.v4.animation.AnimatorListenerCompat;
import android.support.v4.animation.AnimatorUpdateListenerCompat;
import android.support.v4.animation.ValueAnimatorCompat;
import android.view.View;
import java.util.ArrayList;
import java.util.List;

@TargetApi(9)
@RequiresApi(9)
public final class bz
  implements by
{
  public final ValueAnimatorCompat a()
  {
    return new bz.a();
  }
  
  public final void a(View paramView) {}
  
  static final class a
    implements ValueAnimatorCompat
  {
    List<AnimatorListenerCompat> a = new ArrayList();
    List<AnimatorUpdateListenerCompat> b = new ArrayList();
    View c;
    private long d;
    private long e = 200L;
    private float f = 0.0F;
    private boolean g = false;
    private boolean h = false;
    private Runnable i = new Runnable()
    {
      public final void run()
      {
        float f = (float)(bz.a.a(bz.a.this) - bz.a.b(bz.a.this)) * 1.0F / (float)bz.a.c(bz.a.this);
        if ((f > 1.0F) || (bz.a.this.c.getParent() == null)) {
          f = 1.0F;
        }
        bz.a.a(bz.a.this, f);
        bz.a.d(bz.a.this);
        if (bz.a.e(bz.a.this) >= 1.0F)
        {
          bz.a.f(bz.a.this);
          return;
        }
        bz.a.this.c.postDelayed(bz.a.g(bz.a.this), 16L);
      }
    };
    
    private void a()
    {
      int j = this.a.size() - 1;
      while (j >= 0)
      {
        ((AnimatorListenerCompat)this.a.get(j)).onAnimationEnd(this);
        j -= 1;
      }
    }
    
    public final void addListener(AnimatorListenerCompat paramAnimatorListenerCompat)
    {
      this.a.add(paramAnimatorListenerCompat);
    }
    
    public final void addUpdateListener(AnimatorUpdateListenerCompat paramAnimatorUpdateListenerCompat)
    {
      this.b.add(paramAnimatorUpdateListenerCompat);
    }
    
    public final void cancel()
    {
      if (this.h) {
        return;
      }
      this.h = true;
      if (this.g)
      {
        int j = this.a.size() - 1;
        while (j >= 0)
        {
          ((AnimatorListenerCompat)this.a.get(j)).onAnimationCancel(this);
          j -= 1;
        }
      }
      a();
    }
    
    public final float getAnimatedFraction()
    {
      return this.f;
    }
    
    public final void setDuration(long paramLong)
    {
      if (!this.g) {
        this.e = paramLong;
      }
    }
    
    public final void setTarget(View paramView)
    {
      this.c = paramView;
    }
    
    public final void start()
    {
      if (this.g) {
        return;
      }
      this.g = true;
      int j = this.a.size() - 1;
      while (j >= 0)
      {
        ((AnimatorListenerCompat)this.a.get(j)).onAnimationStart(this);
        j -= 1;
      }
      this.f = 0.0F;
      this.d = this.c.getDrawingTime();
      this.c.postDelayed(this.i, 16L);
    }
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/bz.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */