Photon

is an image loading library for Android. Photon is easy,fast and light library Image downloading In Memory Caching Disk Caching val cacheSize =4194304 //4MiB

Fast and light image loading library based on kotlin

Language:

Kotlin

Owner:

mrabelwahed

Contributors:

mrabelwahed
mahmoud-ramadan-abdelwahed

License:

MIT License

Description:

Photon

is an image loading library for Android. Photon is easy,fast and light library

features

  • Image downloading
  • In Memory Caching
  • Disk Caching

Sample App

How to use Photon

    val imageLoader = Photon.getInstance(this)

    imageLoader.displayImage(URL1,image1 , R.drawable.place_holder)



manage cache

setup maximum cache

val cacheSize =4194304 //4MiB

val imageLoader = Photon.getInstance(this , cacheSize)

clear cache

imageLoader.clearcache()

cancel Loading

- to cancel certain image loading task 

imageLoader.cancel(url)


-to cancel all tasks
imageLoader.cancelAll()



how to add Photon to your Android Project

Add it in your root build.gradle at the end of repositories:

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


Step 2. Add the dependency

  dependencies {
       implementation 'com.github.mrabelwahed:photon:1.0.3'
  }





How to contribute

  • fork the repository
  • create branch and add feature or fix bug
  • create pull request
Default image
Androidhunt
Android Hunt Is Tech Blog with a Collection Of Android Tutorials and Libraries. Which is used to make android app development simple.
Articles: 261

Leave a Reply