title: ViewPager + Picasso
body: <p>I'm creating a Image Slider using Picasso + Viewpager.<br>
  I am able to swipe the slider base on the image size(counts).<br>
  But no images has been loaded tho i can swipe the screen.<br>
  What is wrong with my codes?  </p>
  
  <p>In my MainActivity,
  I get the links of my images.<br>
  then set the adapter Like this.  </p>
  
  <pre><code> viewPager = (ViewPager)findViewById(R.id.view_pager);
          viewPagerAdapter = new ViewPagerAdapter(MainActivity.this,IMAGES);
          viewPager.setAdapter(viewPagerAdapter);  
  </code></pre>
  
  <p>IMAGES=Arrays of Links(For images).</p>
  
  <p>My ImagePager_layout.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
  
      &lt;ImageView
          android:id="@+id/img"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="2dp"
          android:background="@drawable/plusbtn"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And here i declared my ViewPager..  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:background="#000"&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/view_pager"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;&lt;/android.support.v4.view.ViewPager&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And for My Adapter..  </p>
  
  <pre><code>package com.thesis.juandirection.picasso;
  import android.content.Context;
  import android.os.Parcelable;
  import android.support.v4.view.PagerAdapter;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.widget.ImageView;
  import android.support.v4.view.ViewPager;
  import com.squareup.picasso.Picasso;
  
  import java.util.ArrayList;
  
  /**
   * Created by Galvez on 11/9/2015.
   */
  public class ViewPagerAdapter extends PagerAdapter {
      private  Context context;
      private ArrayList&lt;String&gt; IMAGES = new ArrayList&lt;&gt;();
  
  
      public ViewPagerAdapter(Context context, ArrayList&lt;String&gt; IMAGES) {
          this.IMAGES = IMAGES;
          this.context = context;
      }
  
      @Override
      public int getCount() {
          return IMAGES.size();
      }
  
      @Override
      public void destroyItem(View arg0, int arg1, Object arg2) {
          ((ViewPager) arg0).removeView((View) arg2);
      }
  
      @Override
      public boolean isViewFromObject(View view, Object object) {
          return false;
      }
  
  
      @Override
      public Parcelable saveState() {
          return null;
      }
  
      @Override
      public Object instantiateItem(View collection, int position) {
          LayoutInflater inflater = (LayoutInflater) collection.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          View view = inflater.inflate(R.layout.imagepager_layout,null);
          ((ViewPager) collection).addView(view);
          final ImageView img = (ImageView) view.findViewById(R.id.img);
          Picasso.with(context)
                  .load(IMAGES.get(position))
                  .placeholder(R.drawable.plusbtn)
                  .centerCrop()
                  .fit()
                  .into(img);
          return view;
      }
  }
  </code></pre>