Skip to content

daljeet33/imagesliderview-android

Repository files navigation

imagesliderview-android

The library helps you add an image slider to your android application.

In order to use the sliderview in your app,add the following dependency in the build.gradle of your app module :
compile 'com.oodles:imagesliderview:1.0'

You can declare the SliderViewLayout in your activity layout file like :
< com.example.imagesliderview.Views.SliderViewLayout
android:id="@+id/sliderLayout"
android:layout_width="match_parent"
android:layout_height="300dp"/>

You can declare the following attributes for your SliderViewLayout:

  • showIndicator(boolean) : It decides whether to show indicators at the bottom of the imageview for the active/inactive images.Default value is true.
  • indicatorSize(dimension) : It sets the size for the indicators in dp.Default value is 10.
  • infiniteview(boolean) : It decides whether to loop through the images provided by the user automatically.Default value is true.
  • timeInterval(integer) : It lets you set the time interval(in milliseconds) for which each image is shown in the image slider in case infiniteview is enabled.Default value is 2000ms
  • showarrow(boolean) : It decides whether to show navigation arrows on either side of the image.Default value is false.

The SliderViewLayout provides the following setter methods:

  • setSliderImages(ArrayList imageList,int placeholder) : This method lets you add a list of images to be set in the sliderviewlayout along with an int value for the placeholder resource(specify 0,if you want to use the default placeholder).The ArrayList could be either an Arraylist of UrlImage objects in case of remote images or DrawableImage in case of local images as they both extend SliderImage.
  • setCustomIndicators(Drawable selected,Drawable unselected) : This method lets you add custom indicator shapes for the selected and unselected indicators in the sliderview.
  • setCustomArrows(int leftArrow,int rightArrow) : This method lets you add custom navigation arrows to your sliderview by specifying the int resources for the left and right arrow respectively.

This library uses the glide library from bumptech to display and cache images

Releases

No releases published

Packages

No packages published

Languages