AvatarStyleAdapter.java 1.8 KB
package com.bitstrips.imoji.abv3.style;

import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.bitstrips.imoji.abv3.model.AvatarStylePreviouslySaved;
import com.bitstrips.imoji.persistence.MediaCache;
import java.util.List;

public class AvatarStyleAdapter
  extends PagerAdapter
{
  private final List<Integer> a;
  private final MediaCache b;
  private final AvatarStylePreviouslySaved c;
  
  public AvatarStyleAdapter(List<Integer> paramList, MediaCache paramMediaCache, AvatarStylePreviouslySaved paramAvatarStylePreviouslySaved)
  {
    this.a = paramList;
    this.b = paramMediaCache;
    this.c = paramAvatarStylePreviouslySaved;
  }
  
  public void destroyItem(ViewGroup paramViewGroup, int paramInt, Object paramObject)
  {
    paramViewGroup.removeView(((AvatarStyleViewHolder)paramObject).getView());
  }
  
  public int getCount()
  {
    return this.a.size();
  }
  
  public Object instantiateItem(ViewGroup paramViewGroup, int paramInt)
  {
    View localView = LayoutInflater.from(paramViewGroup.getContext()).inflate(2130903207, paramViewGroup, false);
    paramViewGroup.addView(localView);
    localView.setTag(Integer.valueOf(paramInt));
    paramInt = ((Integer)this.a.get(paramInt)).intValue();
    paramViewGroup = new AvatarStyleViewHolder(localView, this.b, this.c.getStyleTemplateUrl(paramInt));
    paramViewGroup.setAvatarImage();
    return paramViewGroup;
  }
  
  public boolean isViewFromObject(View paramView, Object paramObject)
  {
    return paramView == ((AvatarStyleViewHolder)paramObject).getView();
  }
}


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