package de.fau.cs.mad.kwikshop.android.view;



import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.viewpagerindicator.IconPagerAdapter;

import de.fau.cs.mad.kwikshop.android.R;

public class TutorialSlidesFragmentAdapter extends FragmentPagerAdapter implements
        IconPagerAdapter {

    public static final String IMAGE_RESOURCE_ID = "image_resource";

    private int[] Images = new int[] { R.drawable.ic_launcher, R.drawable.ic_about,
            R.drawable.ic_action, R.drawable.ic_add_to_cart

    };

    protected static final int[] ICONS = new int[] { R.drawable.ic_cart_out,
            R.drawable.ic_cart_out, R.drawable.ic_cart_out, R.drawable.ic_cart_out };

    private int mCount = Images.length;

    public TutorialSlidesFragmentAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        Bundle args = new Bundle();
        args.putInt(IMAGE_RESOURCE_ID, Images[position]);
        Fragment fragment = new TutorialSlideFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public int getCount() {
        return mCount;
    }

    @Override
    public int getIconResId(int index) {
        return ICONS[index % ICONS.length];
    }

    public void setCount(int count) {
        if (count > 0 && count <= 10) {
            mCount = count;
            notifyDataSetChanged();
        }
    }
}

@@ -536,16 +536,12 @@
 .ic_
-launcher
+home
 , R.
@@ -556,13 +556,12 @@
 .ic_
-about
+home
 ,%0A  
@@ -588,14 +588,12 @@
 .ic_
-action
+home
 , R.
@@ -608,188 +608,17 @@
 .ic_
-add_to_cart%0A%0A    %7D;%0A%0A    protected static final int%5B%5D ICONS = new int%5B%5D %7B R.drawable.ic_cart_out,%0A            R.drawable.ic_cart_out, R.drawable.ic_cart_out, R.drawable.ic_cart_out
+home%0A%0A   
  %7D;%0A
@@ -1172,200 +1172,16 @@
 urn 
-ICONS%5Bindex %25 ICONS.length%5D;%0A    %7D%0A%0A    public void setCount(int count) %7B%0A        if (count %3E 0 && count %3C= 10) %7B%0A            mCount = count;%0A            notifyDataSetChanged();%0A        %7D%0A    %7D
+0;%0A    %7D%0A
 %0A%7D%0A

change images; remove icons