AndroidImageSlider Library

An amazing and convenient Android image slider.

License

License

MIT
Categories

Categories

IDE Development Tools
GroupId

GroupId

com.amstronghuang.slider
ArtifactId

ArtifactId

library
Last Version

Last Version

1.1.3
Release Date

Release Date

Type

Type

aar
Description

Description

AndroidImageSlider Library
An amazing and convenient Android image slider.
Project URL

Project URL

https://github.com/chan32167/AndroidImageSlider
Source Code Management

Source Code Management

https://github.com/chan32167/AndroidImageSlider

Download library

How to add to project

<!-- https://jarcasting.com/artifacts/com.amstronghuang.slider/library/ -->
<dependency>
    <groupId>com.amstronghuang.slider</groupId>
    <artifactId>library</artifactId>
    <version>1.1.3</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.amstronghuang.slider/library/
implementation 'com.amstronghuang.slider:library:1.1.3'
// https://jarcasting.com/artifacts/com.amstronghuang.slider/library/
implementation ("com.amstronghuang.slider:library:1.1.3")
'com.amstronghuang.slider:library:aar:1.1.3'
<dependency org="com.amstronghuang.slider" name="library" rev="1.1.3">
  <artifact name="library" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.amstronghuang.slider', module='library', version='1.1.3')
)
libraryDependencies += "com.amstronghuang.slider" % "library" % "1.1.3"
[com.amstronghuang.slider/library "1.1.3"]

Dependencies

compile (4)

Group / Artifact Type Version
com.nineoldandroids : library jar 2.4.0
com.android.support » appcompat-v7 jar 22.2.1
com.android.support » support-v4 jar 22.2.1
com.facebook.fresco : fresco jar 0.7.0

Project Modules

There are no modules declared in this project.

Android Image Slider Build Status

This is based on daimajia's work. I changed it to use frescolib, and fixed some memory leaks.

This is an amazing image slider for the Android platform. I decided to open source this because there is really not an attractive, convenient slider widget in Android.

You can easily load images from any resource using the URI. As it is based on frescolib, read more at http://frescolib.org/docs/supported-uris.html#_

And there are many kinds of amazing animations you can choose. :-D

Demo

Download Apk

This is the old original demo from daimajia

Usage

Step 1

Gradle

dependencies {
    	compile 'com.android.support:support-v4:+'
    	compile 'com.facebook.fresco:fresco:0.7.0+'
    	compile 'com.nineoldandroids:library:2.4.0'
    	compile 'com.amstronghuang.slider:library:1.1.3@aar'
}

Maven

<dependency>
    <groupId>com.facebook.fresco</groupId>
    <artifactId>fresco</artifactId>
    <version>0.7.0</version>
</dependency>
<dependency>
    <groupId>com.nineoldandroids</groupId>
    <artifactId>library</artifactId>
    <version>2.4.0</version>
</dependency>
<dependency>
    <groupId>com.amstronghuang.slider</groupId>
    <artifactId>library</artifactId>
    <version>1.1.3</version>
    <type>apklib</type>
</dependency>

Step 2

Add permissions (if necessary) to your AndroidManifest.xml

<!-- if you want to load images from the internet -->
<uses-permission android:name="android.permission.INTERNET" /> 

<!-- if you want to load images from a file OR from the internet -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

Note: If you want to load images from the internet, you need both the INTERNET and READ_EXTERNAL_STORAGE permissions to allow files from the internet to be cached into local storage.

If you want to load images from drawable, then no additional permissions are necessary.

Step 3

Add the Slider to your layout:

<com.daimajia.slider.library.SliderLayout
        android:id="@+id/slider"
        android:layout_width="match_parent"
        android:layout_height="200dp"
/>

There are some default indicators. If you want to use a provided indicator:

<com.daimajia.slider.library.Indicators.PagerIndicator
        android:id="@+id/custom_indicator"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        />

Code example

====

Advanced usage

Please visit Wiki

Thanks

##About me

If you get any problems when using this library, please feel free to email me.

Bitdeli Badge

Versions

Version
1.1.3
1.1.2
1.1.1
1.1.0
1.0.0