Skip to content

systembugtj/ImageSlider

 
 

Repository files navigation

Image Slider Build Status

Forked from https://github.com/daimajia/AndroidImageSlider

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.

Usage

Step 1

Gradle

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


dependencies {
    compile 'com.github.systembugtj:imageslider:1.0.1'
}

Maven

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.systembugtj</groupId>
    <artifactId>imageslider</artifactId>
    <version>1.0.1</version>
</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"
        />

====

Advanced usage

Please visit Wiki

Thanks

##About me

I am a student in mainland China. I love Google, love Android, love everything that is interesting. If you get any problems when using this library or you have an internship opportunity, please feel free to email me. 😃

About

An amazing and convenient Android image slider.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 100.0%