Easy, sample and flexible library for loading, caching and displaying images on Android.
With gradle: edit your build.gradle
:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
dependencies {
compile 'com.github.intelligo-systems:slight:1.1.3'
}
Or declare it into your pom.xml
:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.intelligo-systems</groupId>
<artifactId>slight</artifactId>
<version>1.1.3</version>
</dependency>
add the following permissions to your AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Java
@Override
public void onCreate(Bundle savedInstanceState) {
...
ImageView imageView = (ImageView) findViewById(R.id.my_image_view);
ImageLoader imageLoader = new ImageLoader(context);
imageLoader.DisplayImage(url, imageView);
}
Kotlin
override fun onCreate(savedInstanceState: Bundle?) {
...
val imageView = findViewById(R.id.my_image_view) as ImageView
val imageLoader = ImageLoader(this)
imageLoader.DisplayImage(url, imageView)
}