![Gitter](https://badges.gitter.im/Join Chat.svg)
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 an internet URL, drawable, or file. And there are many kinds of amazing animations you can choose. :-D
dependencies {
compile "com.android.support:support-v4:+"
//todo upload to jcenter
//compile 'com.daimajia.slider:library:1.1.5@aar'
}
For Eclipse users, I provided a sample project which orgnized as Eclipse way. You can download it from here, and make some changes to fit your project.
Notice: It's the version of 1.0.9, it may not update any more. You can update manually by yourself.
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.
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"
/>
====
Please visit Wiki //todo