explaingit

devlight/infinitecycleviewpager

5,697JavaAudience · developerComplexity · 2/5Setup · easy

TLDR

An Android library for building a scrollable card gallery that loops infinitely in either direction, with a scaling zoom effect on the focused card and built-in auto-scroll.

Mindmap

mindmap
  root((InfiniteCycleViewPager))
    What it does
      Infinite looping
      Horizontal scroll
      Vertical scroll
    Visual effects
      Scale animation
      Three-step scale
      Auto-scroll
    Configuration
      Java code API
      XML attributes
    Platform support
      Android SDK 11
      Xamarin NuGet
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build an infinite-looping image gallery or onboarding card screen for an Android app

USE CASE 2

Create a vertically scrolling card deck that auto-advances on a timer in either direction

USE CASE 3

Implement a swipeable card carousel where the center card scales up for visual emphasis

Tech stack

JavaAndroidXamarin

Getting it running

Difficulty · easy Time to first run · 30min

Library is no longer maintained, copy the source code directly for production use rather than depending on the upstream package.

In plain English

InfiniteCycleViewPager is an Android library that lets you build a scrollable card-swiping screen that loops forever. Instead of hitting a dead end at the last card, the list wraps back around to the beginning, giving users a continuous swiping experience in either direction. The library supports both horizontal and vertical orientations, so you can build a left-right swipe gallery or a top-down scrolling one using the same codebase. The visual effect is a scaling animation: the card currently in focus appears larger, while the cards on either side shrink down. You can control exactly how large the center card gets, how small the side cards become, and how much offset exists between them. There is also an option for a three-step scale (small, medium, large) rather than jumping straight between minimum and maximum sizes. Auto-scroll is built in, letting the cards advance on their own at a set interval in either the forward or backward direction. Setting it up in code involves pointing it at a data adapter and then calling a handful of methods to configure scroll speed, scale values, and an optional animation interpolator. The same options are also available as XML attributes, so you can configure the widget entirely in your layout file without touching Java code. A Xamarin bindings package is available on NuGet for developers working in that ecosystem. One important note: the README states plainly that this library is no longer maintained. The authors are not adding new features or fixing bugs. If you need changes, the recommendation is to copy the source code and modify it yourself. For production Android apps, this is worth keeping in mind before building a dependency on it. The minimum required Android SDK version is 11.

Copy-paste prompts

Prompt 1
I am using InfiniteCycleViewPager in my Android app. How do I set up the adapter and configure scale values in my XML layout?
Prompt 2
How do I enable auto-scroll with InfiniteCycleViewPager and control the direction and interval?
Prompt 3
InfiniteCycleViewPager is unmaintained, show me how to copy its source into my project and tweak the animation interpolator.
Prompt 4
How do I add InfiniteCycleViewPager to my Xamarin Android project via NuGet?
Open on GitHub → Explain another repo

← devlight on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.