Amit Verma
Amit Verma

Reputation: 391

ViewPager from last banner image page to first banner Image page wit

I have a Activity with a view pager for sliding with the four fragment in 1st Fragment I have one more view pager for banner and its getting dynamic image from api but when I am going to last page of banner Image and when slide right it goes to next fagment, I want to make banner Image from last to first page of image enter image description here In activity for fragment slide view pager

<android.support.v4.view.ViewPager
            android:id="@+id/vpPager"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

In Fragment for banner Image using viewPager

<android.support.v4.view.ViewPager android:id="@+id/bannerPager" android:layout_width="match_parent" android:layout_height="200dp" />

I have attached screenshot as well, I want to go from last banner image to first banner image please help me

Upvotes: 0

Views: 334

Answers (1)

Sarthak Gandhi
Sarthak Gandhi

Reputation: 2170

Try setting this:

viewPager.setNestedScrollingEnabled(true);

or try this ViewPager inside ViewPager.How to scroll parent pager horizontally instead of scrolling child, but keep child pager vertical scroll?

Hope this helps.

Upvotes: 1

Related Questions