gitmyhub

AndroidImageSlider

Java ★ 5.6k updated 5y ago

An amazing and convenient Android image slider.

AndroidImageSlider is an open-source library for Android apps that adds a swipeable image carousel to any screen. The author built it because Android did not have an attractive, ready-to-use slider widget at the time. The library handles the common task of displaying a rotating sequence of images with smooth transitions.

You can feed images into the slider from three sources: a URL on the internet, a file stored on the device, or a drawable resource bundled with the app. The library downloads and caches remote images automatically, so you do not need to write any networking code yourself.

Adding it to a project takes three steps. First, you declare the library as a dependency in your build file (Gradle or Maven), alongside two supporting libraries it relies on. Second, if you plan to load images from the internet, you add the relevant permissions to your app's manifest file. Third, you drop a SliderLayout element into your screen layout file, set a height, and wire it up in code.

The library ships with multiple transition animations so images can slide, fade, or flip as they change. It also includes optional dot indicators that show users which slide is currently visible. A demo app is available for download if you want to see the slider in action before integrating it.

The README is brief and points to a wiki for more advanced configuration. The project has not received updates for some time and was originally created by a student developer in China as a personal contribution to the Android open-source community.