All Projects โ†’ sung2063 โ†’ AndroidSliderViewsLibrary

sung2063 / AndroidSliderViewsLibrary

Licence: GPL-3.0 license
AndroidSliderViewsLibrary is an Android SDK library supports vertical & horizontal carousel and slideshow Views which developers simply integrate on Android project. - by @sung2063

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to AndroidSliderViewsLibrary

Vueper Slides
A touch ready and responsive slideshow / carousel for Vue & Vue 3.
Stars: โœญ 319 (+866.67%)
Mutual labels:  slideshow, carousel
Ken Burns Carousel
๐ŸŒ„ A web component that displays a set of images with a ken burns effect
Stars: โœญ 106 (+221.21%)
Mutual labels:  slideshow, carousel
svelte-slidy
๐Ÿ“ธ Sliding action script
Stars: โœญ 211 (+539.39%)
Mutual labels:  slideshow, carousel
Embla Carousel
A lightweight carousel library with fluid motion and great swipe precision.
Stars: โœญ 1,874 (+5578.79%)
Mutual labels:  slideshow, carousel
Jcarousel
Riding carousels with jQuery.
Stars: โœญ 2,031 (+6054.55%)
Mutual labels:  slideshow, carousel
Why-Not-Image-Carousel
Why Not use Image Carousel if you have lots of images to show!
Stars: โœญ 310 (+839.39%)
Mutual labels:  slideshow, carousel
Ngx Gallery
Angular Gallery, Carousel and Lightbox
Stars: โœญ 417 (+1163.64%)
Mutual labels:  slideshow, carousel
Noodel Js
User interface for responsive, dynamic content trees
Stars: โœญ 173 (+424.24%)
Mutual labels:  slideshow, carousel
Slider
Touch swipe image slider/slideshow/gallery/carousel/banner mobile responsive bootstrap
Stars: โœญ 2,046 (+6100%)
Mutual labels:  slideshow, carousel
Keen Slider
The HTML touch slider carousel with the most native feeling
Stars: โœญ 3,097 (+9284.85%)
Mutual labels:  slideshow, carousel
SimpleSlider
Simple responsive slider created in pure javascript.
Stars: โœญ 21 (-36.36%)
Mutual labels:  slideshow, carousel
vue-m-carousel
vue ็งปๅŠจ็ซฏ่ฝฎๆ’ญ็ป„ไปถ
Stars: โœญ 53 (+60.61%)
Mutual labels:  carousel
IndicatorView
IndicatorView Library For Android
Stars: โœญ 41 (+24.24%)
Mutual labels:  carousel
jquery.circular-carousel
[ABANDONED] A 3D-like circular carousel plugin for jQuery.
Stars: โœญ 49 (+48.48%)
Mutual labels:  carousel
DrinksGalleryApp
Xamarin.Forms goodlooking UI sample using the new CarouselView (Parallax).
Stars: โœญ 51 (+54.55%)
Mutual labels:  carousel
react-imageViewer
React component for image displaying in full screen
Stars: โœญ 61 (+84.85%)
Mutual labels:  carousel
v-owl-carousel
๐Ÿฆ‰ VueJS wrapper for Owl Carousel
Stars: โœญ 46 (+39.39%)
Mutual labels:  carousel
react-native-carousel-pager
React Native carousel pager.
Stars: โœญ 90 (+172.73%)
Mutual labels:  carousel
angular-simple-slider
An AngularJS directive providing a simple slider functionality
Stars: โœญ 15 (-54.55%)
Mutual labels:  carousel
infinite-carousel-flutter
Carousel in flutter. Supports infinite looping and gives control over anchor and velocity.
Stars: โœญ 24 (-27.27%)
Mutual labels:  carousel

Android Slider Views Library


Generic badge Generic badge Generic badge

Android Slider Views library supports Carousels and Slideshow Views which developers simply creating a dynamic gallery on the Android application.

๐Ÿ’– Sponsor

Android Slider Views library updates regularly. Your valuable sponsorship helps me contributing more features and maintaining the library. Support me for building more interesting projects! ๐Ÿ’œ

๐ŸŽฌ Sample GIF Images

Horizontal Carousel Carousel w/ Custom Indicator Vertical Carousel

๐Ÿ“‹ Table of Contents

  1. Latest Update
  2. Usage Instruction
    1. Setup Project
    2. CarouselView
    3. SlideshowView
  3. Callback Events
  4. Attributions
    1. CarouselView
    2. SlideshowView
  5. Contributor
  6. License

๐Ÿ†• Latest Update

Updated on May 31st 2021

  • NEW: Implemented slide buttons. โœจ

๐Ÿ“– How To Use Slider Views

1. Setup your Android project setting

Minimum SDK Version: 21 or greater (Update in your app level build.gradle)
Supported Programming Language: Java

Add following snippet code in your project level build.gradle.

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

2. Add required library

First, include following jitpack url inside maven block in your project level build.gradle.

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Next, add the SliderViews and required libraries in app level build.gradle and sync the gradle file.

implementation 'com.github.sung2063:AndroidSliderViewsLibrary:1.8'
implementation 'com.google.android.material:material:1.1.0'

Now you are ready to use SliderView Library. You can start creating CarouselView and SlideshowView.


CarouselView

CarouselView can be used for your application intro and show multiple images or videos in one layout with scrolling. CarouselView by Sliders library supports both horizontal and vertical scrolls.

First, create a CarouselView in your xml file.

<com.sung2063.sliders.carousel.CarouselView
        android:id="@+id/carousel_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:showIndicator="true"
        app:scrollDirection="horizontal"
        app:showSlideNumber="true" />

Set scrollDirection attribution to horizontal for creating horizontal carousel and vertical for vertical carousel.

In your onCreate() method in Activity, create your own custom layouts, add layouts to List, and start the carousel. You can add up to 10 layouts in the CarouselView.

From version 1.6, you can also include sub-title of each slides. In that case, you need to make DescriptiveSlideModel objects that holds slide layout and sub-title and add to List<DescriptiveSlideModel>. Also, do not forget to add app:showSubTitle="true" into your CarouselView in xml. The default is false.

CarouselView carouselView = findViewById(R.id.carousel_view);

// Create your own layouts...
// Create List<ViewGroup> object or List<DescriptiveSlideModel>...
// Add your layouts to list object...

carouselView.setSlideList(layoutList);
carouselView.launch();

Your CarouselView is now displayed on your app! ๐Ÿ‘


SlideshowView

SlideshowView can be used to show the multiple layouts by certain period of time. You can set how much time you want to show each layout to the user.

First, create a SlideshowView in your xml file.

<com.sung2063.sliders.slideshow.SlideshowView
        android:id="@+id/slideshow_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:showIndicator="true"
        app:delayTimePeriod="5"
        app:showSlideNumber="true" />

In your onCreate() method in Activity, create your own custom layouts, add layouts to List<ViewGroup>, and start the slideshow. You can add up to 10 layouts in the SlideshowView.

From version 1.6, you can also include sub-title of each slides. In that case, you need to make DescriptiveSlideModel objects that holds slide layout and sub-title and add to List<DescriptiveSlideModel>. Also, do not forget to add app:showSubTitle="true" into your SlideshowView in xml. The default is false.

SlideshowView slideshowView = findViewById(R.id.slideshow_view);

// Create your own layouts...
// Create List<ViewGroup> object or List<DescriptiveSlideModel>...
// Add your layouts to list object...

slideshowView.setSlideList(layoutList);
slideshowView.launch();

Your SlideshowView is now displayed on your app! ๐Ÿ‘


Callback Events

You can also get callback events from slider. On your Activity, create a SliderListener object with implementing own action and pass this object to the view by calling setSliderListener. Here is the snippet code how to implement the callback:

// Create a callback interface
SliderListener sliderListener = position -> {
     // TODO: Do something when slide is clicked
};

// Set callback object to the View
carouselView.setSliderListener(sliderListener)    // If you are using Carousel
slideshowView.setSliderListener(sliderListener)   // If you are using Slideshow

Check out my Android Slide Sample App project for more example on using SliderView library.

๐ŸŽจ Attributions

Here are available attributions you can use to modify your slider views.

CarouselView

Attribution Value Description
scrollDirection horizontal Display the carousel horizontally. Field value is 0.
vertical Display the carousel vertically. Field value is 1.
showIndicator boolean Show the dot indicator on the slide if the value true, otherwise do not show.
indicatorScale float Used for resize the indicator scale from 0.5 - 1.5.
indicatorSelectedIcon integer Selected indicator icon drawable id.
indicatorUnselectedIcon integer Unselected indicator icon drawable id.
showSlideNumber boolean Show the slide number text if the value is true, otherwise do not show.
slideNumberTextSize int Set the slide number text size in px.
showSubTitle boolean Show the sub-title if the value is true, otherwise do not show.
showSlideButtons boolean Show the slide buttons if the value is true, otherwise do not show. Default is true.

SlideshowView

Attribution Value Description
showIndicator boolean Show the dot indicator on the slide if the value true, otherwise do not show.
indicatorScale float Used for resize the indicator scale from 0.5 - 1.5.
indicatorSelectedIcon integer Selected indicator icon drawable id.
indicatorUnselectedIcon integer Unselected indicator icon drawable id.
showSlideNumber boolean Show the slide number text if the value is true, otherwise do not show.
slideNumberTextSize int Set the slide number text size in px.
delayTimePeriod int The slide delay time in second. Default is 5 seconds.
showSubTitle boolean Show the sub-title if the value is true, otherwise do not show.
showSlideButtons boolean Show the slide buttons if the value is true, otherwise do not show. Default is true.

๐ŸŒŸ Contributor

Sung Hyun Back (@sung2063)

๐Ÿ“ License

The code is licensed under the GNU General Public License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].