whatisgithub

What is bannerviewpager?

zhpanvip/bannerviewpager — explained in plain English

Analysis updated 2026-06-26

3,781JavaAudience · developerComplexity · 2/5Setup · easy

In one sentence

An Android library for building auto-scrolling image carousels (banners) with swipe gestures, page indicators, and multiple display styles, built on top of ViewPager2.

Mindmap

mindmap
  root((bannerviewpager))
    What it does
      Image carousel
      Auto-looping
      Swipe gestures
    Display styles
      Full-width
      Edge peek
      Overlapping scale
    Indicators
      Circle dots
      Dash style
      Custom indicator
    Tech
      Java
      ViewPager2
      Android API 19+
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

What do people build with it?

USE CASE 1

Add an auto-looping image banner to the top of your Android shopping or media app.

USE CASE 2

Show a peek of the previous and next images so users know there is more content to swipe through.

USE CASE 3

Display a fully custom dot or dash indicator that animates as the user swipes between pages.

USE CASE 4

Replicate the banner style used by popular apps like Bilibili or Taobao in your own Android project.

What is it built with?

JavaAndroidViewPager2JitPack

How does it compare?

zhpanvip/bannerviewpagernetflix/maestrotimehop/sticky-headers-recyclerview
Stars3,7813,7773,786
LanguageJavaJavaJava
Setup difficultyeasyhardeasy
Complexity2/54/52/5
Audiencedeveloperdatadeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Distributed via JitPack, add the JitPack maven URL to your project build.gradle and the dependency to your module build.gradle.

Open-source library, check the repository for the specific license terms.

So what is it?

BannerViewPager is an Android library for building image carousels, commonly called banners, inside mobile apps. A banner is the horizontally scrolling set of images you see at the top of apps like shopping platforms, music apps, or video services. This library handles all the mechanics of that: automatic looping, swipe gestures, smooth transitions between pages, and the small dot or line indicators that show which page you are on. The library is built on top of Android's ViewPager2 component, which is the current standard way to handle swipeable page views in Android. The author notes that popular Chinese apps including Tencent Video, QQ Music, Taobao, and Bilibili all use banner patterns that BannerViewPager can replicate. There are several display styles you can choose from. The default shows one image at a time filling the full width. Other styles show part of the previous and next pages peeking in from the edges, so users can see there is more content to swipe to. You can also configure the pages to overlap or scale relative to each other as they scroll. The indicator system, which is the row of dots or dashes showing the current page position, is a separate library called ViewPagerIndicator that was split out from this project. It supports three visual shapes (circle, dash, and rounded rectangle) and five animation styles for how the indicator moves when you swipe. You can also build a fully custom indicator by extending a base class and drawing whatever shape you want. The library supports Android devices running API level 19 and above, which covers Android 4.4 and later. It is distributed through JitPack, a service that lets Android projects pull libraries directly from GitHub. Integration is done by adding a few lines to the project's build files and then adding the view component to an XML layout. Full documentation is on the project's wiki.

Copy-paste prompts

Prompt 1
Show me how to add BannerViewPager to my Android project via JitPack and display a list of image URLs in an auto-looping carousel.
Prompt 2
How do I configure BannerViewPager to show partial previews of the previous and next pages peeking in from the edges?
Prompt 3
Walk me through customising the page indicator in BannerViewPager, I want a rounded-rectangle style that slides smoothly between positions.
Prompt 4
How do I listen for page-click events in BannerViewPager so I can open a detail screen when the user taps a banner image?

Frequently asked questions

What is bannerviewpager?

An Android library for building auto-scrolling image carousels (banners) with swipe gestures, page indicators, and multiple display styles, built on top of ViewPager2.

What language is bannerviewpager written in?

Mainly Java. The stack also includes Java, Android, ViewPager2.

What license does bannerviewpager use?

Open-source library, check the repository for the specific license terms.

How hard is bannerviewpager to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is bannerviewpager for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.