i.java 6.43 KB
import android.content.res.ColorStateList;
import android.graphics.PorterDuff.Mode;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.R.anim;
import android.support.design.widget.VisibilityAwareImageButton;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.util.StateSet;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import java.util.ArrayList;

public class i
  extends k
{
  n a;
  private final q r = new q();
  
  public i(VisibilityAwareImageButton paramVisibilityAwareImageButton, o paramo, s.d paramd)
  {
    super(paramVisibilityAwareImageButton, paramo, paramd);
    this.r.a(j, a(new i.b()));
    this.r.a(k, a(new i.b()));
    this.r.a(l, a(new i.c()));
    this.r.a(m, a(new i.a()));
  }
  
  private s a(@NonNull i.d paramd)
  {
    s locals = this.p.a();
    locals.a(b);
    locals.a(100L);
    locals.a(paramd);
    locals.a(paramd);
    locals.a(0.0F, 1.0F);
    return locals;
  }
  
  private static ColorStateList b(int paramInt)
  {
    return new ColorStateList(new int[][] { k, j, new int[0] }, new int[] { paramInt, paramInt, 0 });
  }
  
  float a()
  {
    return this.h;
  }
  
  void a(float paramFloat1, float paramFloat2)
  {
    if (this.a != null)
    {
      this.a.a(paramFloat1, this.i + paramFloat1);
      f();
    }
  }
  
  void a(int paramInt)
  {
    if (this.e != null) {
      DrawableCompat.setTintList(this.e, b(paramInt));
    }
  }
  
  final void a(ColorStateList paramColorStateList)
  {
    if (this.d != null) {
      DrawableCompat.setTintList(this.d, paramColorStateList);
    }
    if (this.f != null) {
      this.f.a(paramColorStateList);
    }
  }
  
  void a(ColorStateList paramColorStateList, PorterDuff.Mode paramMode, int paramInt1, int paramInt2)
  {
    this.d = DrawableCompat.wrap(h());
    DrawableCompat.setTintList(this.d, paramColorStateList);
    if (paramMode != null) {
      DrawableCompat.setTintMode(this.d, paramMode);
    }
    this.e = DrawableCompat.wrap(h());
    DrawableCompat.setTintList(this.e, b(paramInt1));
    if (paramInt2 > 0)
    {
      this.f = a(paramInt2, paramColorStateList);
      paramColorStateList = new Drawable[3];
      paramColorStateList[0] = this.f;
      paramColorStateList[1] = this.d;
      paramColorStateList[2] = this.e;
    }
    for (;;)
    {
      this.g = new LayerDrawable(paramColorStateList);
      this.a = new n(this.n.getContext(), this.g, this.o.a(), this.h, this.h + this.i);
      paramColorStateList = this.a;
      paramColorStateList.k = false;
      paramColorStateList.invalidateSelf();
      this.o.a(this.a);
      return;
      this.f = null;
      paramColorStateList = new Drawable[2];
      paramColorStateList[0] = this.d;
      paramColorStateList[1] = this.e;
    }
  }
  
  final void a(PorterDuff.Mode paramMode)
  {
    if (this.d != null) {
      DrawableCompat.setTintMode(this.d, paramMode);
    }
  }
  
  void a(Rect paramRect)
  {
    this.a.getPadding(paramRect);
  }
  
  void a(@Nullable final k.a parama, final boolean paramBoolean)
  {
    if (k()) {
      return;
    }
    this.c = 1;
    Animation localAnimation = AnimationUtils.loadAnimation(this.n.getContext(), R.anim.design_fab_out);
    localAnimation.setInterpolator(c.c);
    localAnimation.setDuration(200L);
    localAnimation.setAnimationListener(new c.a()
    {
      public final void onAnimationEnd(Animation paramAnonymousAnimation)
      {
        i.this.c = 0;
        paramAnonymousAnimation = i.this.n;
        if (paramBoolean) {}
        for (int i = 8;; i = 4)
        {
          paramAnonymousAnimation.a(i, paramBoolean);
          if (parama != null) {
            parama.b();
          }
          return;
        }
      }
    });
    this.n.startAnimation(localAnimation);
  }
  
  void a(int[] paramArrayOfInt)
  {
    q localq = this.r;
    int j = localq.a.size();
    int i = 0;
    q.a locala;
    if (i < j)
    {
      locala = (q.a)localq.a.get(i);
      if (!StateSet.stateSetMatches(locala.a, paramArrayOfInt)) {}
    }
    for (paramArrayOfInt = locala;; paramArrayOfInt = null)
    {
      if (paramArrayOfInt != localq.b)
      {
        if ((localq.b != null) && (localq.c != null))
        {
          localq.c.a.e();
          localq.c = null;
        }
        localq.b = paramArrayOfInt;
        if (paramArrayOfInt != null)
        {
          localq.c = paramArrayOfInt.b;
          localq.c.a.a();
        }
      }
      return;
      i += 1;
      break;
    }
  }
  
  void b()
  {
    q localq = this.r;
    if (localq.c != null)
    {
      localq.c.a.g();
      localq.c = null;
    }
  }
  
  void b(@Nullable final k.a parama, boolean paramBoolean)
  {
    if (j()) {
      return;
    }
    this.c = 2;
    this.n.a(0, paramBoolean);
    Animation localAnimation = AnimationUtils.loadAnimation(this.n.getContext(), R.anim.design_fab_in);
    localAnimation.setDuration(200L);
    localAnimation.setInterpolator(c.d);
    localAnimation.setAnimationListener(new c.a()
    {
      public final void onAnimationEnd(Animation paramAnonymousAnimation)
      {
        i.this.c = 0;
        if (parama != null) {
          parama.a();
        }
      }
    });
    this.n.startAnimation(localAnimation);
  }
  
  void c() {}
  
  final class a
    extends i.d
  {
    a()
    {
      super((byte)0);
    }
    
    protected final float a()
    {
      return 0.0F;
    }
  }
  
  final class b
    extends i.d
  {
    b()
    {
      super((byte)0);
    }
    
    protected final float a()
    {
      return i.this.h + i.this.i;
    }
  }
  
  final class c
    extends i.d
  {
    c()
    {
      super((byte)0);
    }
    
    protected final float a()
    {
      return i.this.h;
    }
  }
  
  abstract class d
    extends s.b
    implements s.c
  {
    private boolean a;
    private float c;
    private float d;
    
    private d() {}
    
    protected abstract float a();
    
    public final void a(s params)
    {
      if (!this.a)
      {
        this.c = i.this.a.j;
        this.d = a();
        this.a = true;
      }
      i.this.a.a(this.c + (this.d - this.c) * params.a.f());
    }
    
    public final void b(s params)
    {
      i.this.a.a(this.d);
      this.a = false;
    }
  }
}


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