A simple Coverflow widget based on a ViewPager with animation onStart
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
gradle/wrapper
screenshots
.gitignore
CarouselViewPager.iml
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

CarouselViewPager

A simple Coverflow widget based on a ViewPager. The provided example use coffee illustrations :3.

CarouselViewPager example

CarouselViewPager description

CarouselViewPager animation

Features :

  • The current page is pushed forward the other items thanks to a scaling.
  • An animation is available onStart of the Activity
  • A padding is applied to be able to have 3 pages displayed at once.
  • You can control the speed of the scrolling

Example of initialisation :

CarouselViewPager carousel = (CarouselViewPager) findViewById(R.id.carousel);
ArrayList<Entity> entities = buildData();
CarouselAdapter carouselAdapter = new CarouselAdapter(this, carousel, getSupportFragmentManager(), entities);

carousel.setAdapter(carouselAdapter);
carousel.addOnPageChangeListener(carouselAdapter);
carousel.setOffscreenPageLimit(entities.size());
carousel.setClipToPadding(false);

carousel.setScrollDurationFactor(1.5f);
carousel.setPageWidth(0.55f);
carousel.settPaddingBetweenItem(16);