title: Moving view pager to first item when the end of view pager is reached
body: <p>Following is my instantiateItem method</p>
  
  <pre><code>@Override
      public Object instantiateItem(ViewGroup container, int position) {
          View itemView = mLayoutInflater.inflate(R.layout.pager_item, container, false);
  
          ImageView imageView = (ImageView) itemView.findViewById(R.id.img);
          TextView textView = (TextView) itemView.findViewById(R.id.txt);
          imageView.setImageResource(mResources[position]);
          textView.setText(mCompanies[position]);
          container.addView(itemView);
  
          return itemView;
      }
  </code></pre>
  
  <p>I want to detect if user has reached the end of view pager by scrolling and if the user has reached the end, I wanna shake the entire viewpager from left to right. How can I do so?</p>