AvatarMakeupViewHolder.java 2.86 KB
package com.bitstrips.imoji.abv3.option;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.PorterDuff.Mode;
import android.support.v7.widget.RecyclerView.LayoutParams;
import android.util.DisplayMetrics;
import android.view.View;
import android.widget.ImageView;

public class AvatarMakeupViewHolder
  extends AvatarOptionBaseViewHolder
{
  private View n;
  private final MakeupImageView o;
  private final MakeupImageView p;
  private final ImageView q;
  private int r;
  
  public AvatarMakeupViewHolder(View paramView, Context paramContext)
  {
    super(paramView);
    this.n = paramView;
    this.o = ((MakeupImageView)paramView.findViewById(2131689575));
    this.p = ((MakeupImageView)paramView.findViewById(2131689902));
    this.q = ((ImageView)paramView.findViewById(2131689876));
    int i = (int)(paramContext.getResources().getDisplayMetrics().widthPixels * 0.025D) / 2;
    paramView = new RecyclerView.LayoutParams(-1, -1);
    paramView.setMargins(i, i, i, i);
    this.n.setLayoutParams(paramView);
  }
  
  public void setOption(String paramString, int paramInt)
  {
    int i = 0;
    this.o.setImageDrawable(null);
    this.o.setVisibility(0);
    this.p.setVisibility(8);
    this.q.setVisibility(8);
    this.r = paramInt;
    if (paramInt != -1)
    {
      if (paramString.equals("blush_tone"))
      {
        this.o.setSquare();
        label62:
        this.o.setColorFilter(paramInt, PorterDuff.Mode.MULTIPLY);
        switch (paramString.hashCode())
        {
        default: 
          label112:
          paramInt = -1;
        }
      }
      for (;;)
      {
        switch (paramInt)
        {
        default: 
          return;
          this.o.setCircle();
          break label62;
          if (!paramString.equals("blush_tone")) {
            break label112;
          }
          paramInt = i;
          continue;
          if (!paramString.equals("eyeshadow_tone")) {
            break label112;
          }
          paramInt = 1;
          continue;
          if (!paramString.equals("lipstick_tone")) {
            break label112;
          }
          paramInt = 2;
        }
      }
      this.o.setImageResource(2130837621);
      return;
      this.o.setImageResource(2130837622);
      return;
      this.o.setImageResource(2130837623);
      return;
    }
    this.o.setVisibility(8);
    this.p.setVisibility(0);
    if (paramString.equals("blush_tone"))
    {
      this.p.setSquare();
      return;
    }
    this.p.setCircle();
  }
  
  public void setSelected(boolean paramBoolean)
  {
    if ((paramBoolean) && (this.r != -1))
    {
      this.q.setVisibility(0);
      return;
    }
    this.q.setVisibility(4);
  }
}


/* Location:              /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/abv3/option/AvatarMakeupViewHolder.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */