l.java 5.32 KB
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.AnimatorSet.Builder;
import android.animation.ObjectAnimator;
import android.animation.StateListAnimator;
import android.annotation.TargetApi;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff.Mode;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.InsetDrawable;
import android.graphics.drawable.LayerDrawable;
import android.graphics.drawable.RippleDrawable;
import android.os.Build.VERSION;
import android.support.annotation.RequiresApi;
import android.support.design.widget.VisibilityAwareImageButton;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.view.View;

@TargetApi(21)
@RequiresApi(21)
public final class l
  extends j
{
  private InsetDrawable r;
  
  public l(VisibilityAwareImageButton paramVisibilityAwareImageButton, o paramo, s.d paramd)
  {
    super(paramVisibilityAwareImageButton, paramo, paramd);
  }
  
  public final float a()
  {
    return this.n.getElevation();
  }
  
  final void a(float paramFloat1, float paramFloat2)
  {
    if (Build.VERSION.SDK_INT == 21) {
      if (this.n.isEnabled())
      {
        this.n.setElevation(paramFloat1);
        if ((this.n.isFocused()) || (this.n.isPressed())) {
          this.n.setTranslationZ(paramFloat2);
        }
      }
    }
    for (;;)
    {
      if (this.o.b()) {
        f();
      }
      return;
      this.n.setTranslationZ(0.0F);
      continue;
      this.n.setElevation(0.0F);
      this.n.setTranslationZ(0.0F);
      continue;
      StateListAnimator localStateListAnimator = new StateListAnimator();
      AnimatorSet localAnimatorSet = new AnimatorSet();
      localAnimatorSet.play(ObjectAnimator.ofFloat(this.n, "elevation", new float[] { paramFloat1 }).setDuration(0L)).with(ObjectAnimator.ofFloat(this.n, View.TRANSLATION_Z, new float[] { paramFloat2 }).setDuration(100L));
      localAnimatorSet.setInterpolator(b);
      localStateListAnimator.addState(j, localAnimatorSet);
      localAnimatorSet = new AnimatorSet();
      localAnimatorSet.play(ObjectAnimator.ofFloat(this.n, "elevation", new float[] { paramFloat1 }).setDuration(0L)).with(ObjectAnimator.ofFloat(this.n, View.TRANSLATION_Z, new float[] { paramFloat2 }).setDuration(100L));
      localAnimatorSet.setInterpolator(b);
      localStateListAnimator.addState(k, localAnimatorSet);
      localAnimatorSet = new AnimatorSet();
      localAnimatorSet.playSequentially(new Animator[] { ObjectAnimator.ofFloat(this.n, "elevation", new float[] { paramFloat1 }).setDuration(0L), ObjectAnimator.ofFloat(this.n, View.TRANSLATION_Z, new float[] { this.n.getTranslationZ() }).setDuration(100L), ObjectAnimator.ofFloat(this.n, View.TRANSLATION_Z, new float[] { 0.0F }).setDuration(100L) });
      localAnimatorSet.setInterpolator(b);
      localStateListAnimator.addState(l, localAnimatorSet);
      localAnimatorSet = new AnimatorSet();
      localAnimatorSet.play(ObjectAnimator.ofFloat(this.n, "elevation", new float[] { 0.0F }).setDuration(0L)).with(ObjectAnimator.ofFloat(this.n, View.TRANSLATION_Z, new float[] { 0.0F }).setDuration(0L));
      localAnimatorSet.setInterpolator(b);
      localStateListAnimator.addState(m, localAnimatorSet);
      this.n.setStateListAnimator(localStateListAnimator);
    }
  }
  
  final void a(int paramInt)
  {
    if ((this.e instanceof RippleDrawable))
    {
      ((RippleDrawable)this.e).setColor(ColorStateList.valueOf(paramInt));
      return;
    }
    super.a(paramInt);
  }
  
  final 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);
    }
    if (paramInt2 > 0) {
      this.f = a(paramInt2, paramColorStateList);
    }
    for (paramColorStateList = new LayerDrawable(new Drawable[] { this.f, this.d });; paramColorStateList = this.d)
    {
      this.e = new RippleDrawable(ColorStateList.valueOf(paramInt1), paramColorStateList, null);
      this.g = this.e;
      this.o.a(this.e);
      return;
      this.f = null;
    }
  }
  
  final void a(Rect paramRect)
  {
    if (this.o.b())
    {
      float f1 = this.o.a();
      float f2 = this.n.getElevation() + this.i;
      int i = (int)Math.ceil(n.b(f2, f1, false));
      int j = (int)Math.ceil(n.a(f2, f1, false));
      paramRect.set(i, j, i, j);
      return;
    }
    paramRect.set(0, 0, 0, 0);
  }
  
  final void a(int[] paramArrayOfInt) {}
  
  final void b() {}
  
  final void b(Rect paramRect)
  {
    if (this.o.b())
    {
      this.r = new InsetDrawable(this.e, paramRect.left, paramRect.top, paramRect.right, paramRect.bottom);
      this.o.a(this.r);
      return;
    }
    this.o.a(this.e);
  }
  
  final void c()
  {
    f();
  }
  
  final boolean d()
  {
    return false;
  }
  
  final d g()
  {
    return new e();
  }
  
  final GradientDrawable i()
  {
    return new l.a();
  }
  
  static final class a
    extends GradientDrawable
  {
    public final boolean isStateful()
    {
      return true;
    }
  }
}


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