Need help with CarouselEffect?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

126 Stars 54 Forks 14 Commits 4 Opened issues


Carousel Effect with ViewPager

Services available


Need anything else?

Contributors list

# 443,621
5 commits


Carousel Effect with ViewPager



Simply add two ViewPager in FrameLayout (1. Top ViewPager for CarouselEffect, 2. Background ViewPager)

Set Top ViewPager padding left and right so previsous and next item display and also set android:clipToPadding="false"

Set Adapter for both ViewPager with same list items

< android:id="@+id/viewpagerTop" android:layout_width="match_parent" android:layout_height="match_parent" android:cliptopadding="false" android:paddingleft="50dp" android:paddingright="50dp" android:layout_gravity="center"></>

Parallel scroll both for ViewPagers set OnPageChangeListener to Top ViewPager and override onPageScrolled() and write below logic to

public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
         int width = viewPagerBackground.getWidth();
         viewPagerBackground.scrollTo((int) (width * position + width * positionOffset), 0);

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.