package com.ikea.kompis.view;

import android.content.Context;
import android.content.res.Resources;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import com.ikea.kompis.util.UiUtil;
import com.viewpagerindicator.ImagePageIndicator;

public class CustomImagePageIndicator extends ImagePageIndicator
{
  public CustomImagePageIndicator(Context paramContext)
  {
    this(paramContext, null);
  }

  public CustomImagePageIndicator(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
  }

  public void notifyDataSetChanged()
  {
    this.mIconsLayout.removeAllViews();
    BasePagerAdapter localBasePagerAdapter = (BasePagerAdapter)this.mViewPager.getAdapter();
    int i = localBasePagerAdapter.getCount();
    int j = (int)this.mContext.getResources().getDimension(2131361887);
    LinearLayout.LayoutParams localLayoutParams = new LinearLayout.LayoutParams((int)getResources().getDimension(2131361890), (int)getResources().getDimension(2131361888), 17.0F);
    localLayoutParams.setMargins(0, 0, (int)getResources().getDimension(2131361889), 0);
    for (int k = 0; k < i; k++)
    {
      ImageView localImageView = new ImageView(getContext());
      localImageView.setPadding(j, j, j, j);
      localImageView.setScaleType(ImageView.ScaleType.FIT_XY);
      localImageView.setBackgroundResource(2130837808);
      UiUtil.loadImageAsync(this.mContext, localImageView, localBasePagerAdapter.getImageURI(k));
      localImageView.setOnClickListener(this);
      localImageView.setId(k);
      localImageView.setLayoutParams(localLayoutParams);
      this.mIconsLayout.addView(localImageView);
    }
    if (this.mCurrentPage > i)
      this.mCurrentPage = (i - 1);
    setCurrentItem(this.mCurrentPage);
    requestLayout();
  }
}

/* Location:           C:\Documents and Settings\Cesar Cabello Cea\Mis documentos\Downloads\apk-downloader\com.ikea.kompis-6_dex2jar.jar
 * Qualified Name:     com.ikea.kompis.view.CustomImagePageIndicator
 * JD-Core Version:    0.6.2
 */