gitmyhub

Android-ConvenientBanner

Java ★ 4.7k updated 2y ago

Simple and convenient banner, loop viewpager with 3D effects

Android-ConvenientBanner is a Java library for Android that makes it easy to add a looping image banner or carousel to an app. The kind of component it provides is the sliding image strip you commonly see at the top of e-commerce or news apps, where a set of images or cards rotates automatically and can also be swiped by the user.

The library wraps Android's RecyclerView under the hood and handles the looping logic, page indicators (the small dots that show which slide is active), and 3D transition animations between slides. You can configure it through either an XML layout file or Java code, and it supports click listeners on individual items.

Adding it to an Android project is done through a single Gradle dependency line. The README includes short code examples showing how to supply a list of items, define how each item should be displayed using a holder class, and wire up a click handler. The demo project on GitHub shows it in action.

The README contains significant garbled text, likely due to character encoding problems with what was originally Chinese-language documentation. The code examples and version changelog are still readable. Version 2.1.5 added AndroidX support, which is required for modern Android projects.

The library builds on several open-source components including LoopingViewPager, ViewPagerTransforms, and RecyclerViewCardGallery, which handle the lower-level details of infinite scrolling and the visual transition effects.