private void createMultiImageView() {
    this.removeAllViews();

    View content =
        LayoutInflater.from(getContext())
            .inflate(R.layout.story_media_content_view_multi, this, false);

    mCurrentPageIndicator = (DottedProgressView) content.findViewById(R.id.currentPageIndicator);
    mViewPager = (NestedViewPager) content.findViewById(R.id.contentPager);
    mViewPager.setViewPagerIndicator(mCurrentPageIndicator);
    mViewPager.setAdapter(
        new StoryItemMediaContentPagerAdapter(
            getContext(), mMediaViewCollection, mAllowFullScreenMediaViewing));
    if (mAllowFullScreenMediaViewing) {
      mViewPager.setPropagateClicks(false);
    } else {
      mViewPager.setPropagateClicks(true);
    }
    addView(content);
  }
 public int getCurrentItemIndex() {
   if (this.getChildCount() > 0 && mViewPager != null && this.getChildAt(0) == mViewPager)
     return mViewPager.getCurrentItem();
   return 0;
 }