This is a library for make auto slide image in android

Overview

Auto Image Slider

Screenshot

Image Slider Default Image Slider With Custom Adapter

Usage

  • Add ImageSlider to your layout
">
    <com.afdhal_fa.imageslider.ImageSlider
        android:id="@+id/imageSlide"
        android:layout_width="match_parent"
        android:layout_height="250dp"
        app:iss_auto_cycle="true"
        app:iss_delay="0"
        app:iss_period="1000"/>
  • You can change placeholder image.
 app:iss_placeholder="@drawable/placeholder"
  • You can change error image.
 app:iss_error_image="@drawable/error"
  • You can change image scale type.
 app:iss_image_scaleType="centerCrop"
  • You can change title color
app:iss_title_color="@color/purple_500"
  • You can hide title
app:iss_with_title="false"
  • You can hide background title
app:iss_with_background="false"
  • You can change text gravity
app:iss_title_gravity="center"
  • You can change text title background
app:iss_title_background="@drawable/gradient"
  • Add ImageSlider to your Activity
  val imageList = ArrayList<SlideUIModel>() 
  imageList.add(SlideUIModel("https://s.id/Ccoeo", "Blackpink - Jennie"))
  imageList.add(SlideUIModel("https://s.id/CcouZ", "Blackpink - Lisa"))
  imageList.add(SlideUIModel("https://s.id/CcoQ1", "Blackpink - Rose"))
  imageList.add(SlideUIModel("https://s.id/Cco-g", "Blackpink - Jisoo"))

  imageSlide.setImageList(imageList)
  • You can use click listener.
  imageSlide.setItemClickListener(object : ItemClickListener {
      override fun onItemClick(model: SlideUIModel, position: Int) {
          Toast.makeText(this@MainActivity, "${model.title}", Toast.LENGTH_SHORT).show()
      }
  })
  • You can add stop and start auto sliding again.
  imageSlide.startSliding(3000) // with new period
  imageSlide.startSliding()
  imageSlide.stopSliding()
  • You can make custom item slide with recyclerview adapter. You can see example adapter here Example Custom Adapter
  val imageList = ArrayList<BannerUIModel>() // Create image list
  imageList.add(BannerUIModel("https://s.id/Ccoeo", "Blackpink - Jennie"))
  imageList.add(BannerUIModel("https://s.id/CcouZ", "Blackpink - Lisa"))
  imageList.add(BannerUIModel("https://s.id/CcoQ1", "Blackpink - Rose"))
  imageList.add(BannerUIModel("https://s.id/Cco-g", "Blackpink - Jisoo"))
  mAdapter.setItem(imageList)
  binding.imageSlide.setImageListWithAdapter(mAdapter, imageList.size)
  mAdapter.onItemClick = {  // user click listener adapter
      Toast.makeText(this, it.title, Toast.LENGTH_SHORT).show()
   }

Dependencies

Add maven jitpack.io and dependencies in build.gradle (Project) :

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

// build.gradle app/module
dependencies {
    ...
     implementation 'com.github.Fuadafdhal:Auto-Image-Slider:1.0'
}

License

Copyright 2021 Muh Fuad Afdhal

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

You might also like...
Custom ImageView for moving image around the screen (Android)
Custom ImageView for moving image around the screen (Android)

MovingImageView Create a custom ImageView for moving image around the screen. Usage To use MovingImageView, add the module into your project and start

Flickable ImageView for Android. It's like a view of twitter's detail image.
Flickable ImageView for Android. It's like a view of twitter's detail image.

FlickableView Flickable ImageView for Android. It's like a view of twitter's detail image. It's possible that other views animate with FlickableView.

Add curve at bottom of image views and relative layouts.
Add curve at bottom of image views and relative layouts.

Crescento Android library that adds a curve at the below of image views and relative layouts. CrescentoImageView and CrescentoContainer are the image

Custom ImageView to generate captcha image.
Custom ImageView to generate captcha image.

CaptchaImageView Custom ImageView to generate captcha image. Add CaptchaImageView to your layout test.jinesh.captchaimageviewlib.CaptchaImageView

A photoView to scale image and finish activity,高仿微信可拖拽返回PhotoView
A photoView to scale image and finish activity,高仿微信可拖拽返回PhotoView

DragPhotoView(English) 高仿微信可拖拽返回PhotoView 基于 PhotoView ##下载APK体验 特性 拖拽缩放图片,并且结束Activity 其他PhotoView所有特性如下: Out of the box zooming, using multi-touch a

Android library (AAR). Highly configurable, easily extendable deep zoom view for displaying huge images without loss of detail. Perfect for photo galleries, maps, building plans etc.
Android library (AAR). Highly configurable, easily extendable deep zoom view for displaying huge images without loss of detail. Perfect for photo galleries, maps, building plans etc.

Subsampling Scale Image View A custom image view for Android, designed for photo galleries and displaying huge images (e.g. maps and building plans) w

Android library project for cropping images
Android library project for cropping images

I guess people are just cropping out all the sadness An Android library project that provides a simple image cropping Activity, based on code from AOS

An open source Android library that allows the visualization of large images with gesture capabilities
An open source Android library that allows the visualization of large images with gesture capabilities

ByakuGallery ByakuGallery is an open source Android library that allows the visualization of large images with gesture capabilities. This lib is based

Android Blurred ImageSwitcher Library
Android Blurred ImageSwitcher Library

Android Blurred ImageSwitcher Library

Releases(1.0)
Owner
Afdhal_FA
Wants to collaboration? Sending an email to me - Android Developer Native Java & Kotlin
Afdhal_FA
Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling Scale Image View, Fresco, Glide, and Picasso. Even with gif and webp support! 🍻

BigImageViewer Big image viewer supporting pan and zoom, with very little memory usage and full featured image loading choices. Powered by Subsampling

Piasy 3.9k Dec 30, 2022
Image Picker with Customizable UI for Android, Pick an image from Gallery

Image Picker A Image Picker Library for Android (Supports Android 12) with fully

null 2 May 29, 2022
Android library to generate image avatar from the first letter of a username. Letter avatar like Gmail Android best practice

AvatarImageGenerator Generate first letter avatar Image like gmail's contact avatar. It generates an drawable that can be be set to an ImageView. Inst

Korir Amos 61 Sep 25, 2022
Android library written in kotlin that add a noise effect to image.

NoiseView With NoiseView you can easily add a noise effect to your image. See demo on YouTube Setup The library is pushed to jCenter() as an AAR, so y

Przemek 46 Sep 8, 2022
Customizable Android full screen image viewer for Fresco library supporting "pinch to zoom" and "swipe to dismiss" gestures. Made by Stfalcon

This project is no longer supported. If you're able to switch from Fresco to any other library that works with the Android's ImageView, please migrate

Stfalcon LLC 1.8k Dec 19, 2022
Android Library for cropping an image at ease.

Cropper - Android Image Cropper Android Image Cropper Powerful (Zoom, Rotation, Multi-Source); Customizable (Shape, Limits, Style); Optimized (Async,

Akshat Tiwari 24 Aug 24, 2022
A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows

A library for Android provides blurred drop shadows to ImageView similar to iOS image backdrop shadows.Provides fast canvas draw as no renderscript needed .The similar shadow blurred effects can also be seen in iOS Music App.

Vivek Verma 163 Dec 31, 2022
Android widget for cropping and rotating an image.

Cropper The Cropper is an image cropping tool. It provides a way to set an image in XML and programmatically, and displays a resizable crop window on

Edmodo 2.9k Nov 14, 2022
Android ImageView replacement which allows image loading from URLs or contact address book, with caching

Smart Image View for Android SmartImageView is a drop-in replacement for Android’s standard ImageView which additionally allows images to be loaded fr

James Smith 1.3k Dec 24, 2022
Replacement for deprecated official Android crop image function

The MIT License (MIT) Copyright (c) 2012 Jan Muller Permission is hereby granted, free of charge, to any person obtaining a copy of this software and

Jan Muller 561 Nov 25, 2022