KeyboardPagerAdapter.java 2.2 KB
package com.bitstrips.imoji.keyboard;

import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.bitstrips.imoji.browser.BitmojiClickListener;
import com.bitstrips.imoji.browser.views.SearchTagViewHolder.OnSearchTagClickListener;
import java.util.List;

public class KeyboardPagerAdapter
  extends PagerAdapter
{
  final List<String> a;
  BitmojisView b;
  private LayoutInflater c;
  private final SearchTagViewHolder.OnSearchTagClickListener d;
  private final BitmojiClickListener e;
  
  public KeyboardPagerAdapter(Context paramContext, List<String> paramList, SearchTagViewHolder.OnSearchTagClickListener paramOnSearchTagClickListener, BitmojiClickListener paramBitmojiClickListener)
  {
    this.c = ((LayoutInflater)paramContext.getSystemService("layout_inflater"));
    this.a = paramList;
    this.d = paramOnSearchTagClickListener;
    this.e = paramBitmojiClickListener;
  }
  
  public void destroyItem(ViewGroup paramViewGroup, int paramInt, Object paramObject)
  {
    paramViewGroup.removeView((FrameLayout)paramObject);
  }
  
  public int getCount()
  {
    return this.a.size() + 1;
  }
  
  public Object instantiateItem(ViewGroup paramViewGroup, int paramInt)
  {
    View localView;
    if (paramInt == 0)
    {
      localView = this.c.inflate(2130903172, paramViewGroup, false);
      this.b = ((BitmojisView)localView.findViewById(2131689882));
      ((BitmojisViewTags)this.b).setOnSearchTagClickListener(this.d);
    }
    for (;;)
    {
      paramViewGroup.addView(localView);
      return localView;
      localView = this.c.inflate(2130903171, paramViewGroup, false);
      this.b = ((BitmojisView)localView.findViewById(2131689882));
      this.b.showFromSuperTag((String)this.a.get(paramInt - 1));
      this.b.setClickListener(this.e);
    }
  }
  
  public boolean isViewFromObject(View paramView, Object paramObject)
  {
    return paramView == paramObject;
  }
}


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