-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Getting Start
Let's getting start to use AndroidImageSlider
.
The first thing you have to do, is to load this library to your environment.
If you are using Android Studio, just add the following code to your project root build.gradle
.
dependencies {
compile "com.android.support:support-v4:+"
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
}
Then click the sync now
button in the Android Studio toolbar to make sure that the library will be downloaded to the local storage.
If you are using maven to manage your project, add the following to your pom.xml
:
<dependency>
<groupId>com.squareup.picasso</groupId>
<artifactId>picasso</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>com.nineoldandroids</groupId>
<artifactId>library</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>com.daimajia.slider</groupId>
<artifactId>library</artifactId>
<version>1.0.9</version>
<type>apklib</type>
</dependency>
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.
That's it for configuration, Let's start to using this.
You are welcome to contribute and share your amazing indicator, transformer or slider child view animation design. 😄