mrabelwahed / photon

Fast and light image loading library based on kotlin

Home Page:http://mahmoudramadan.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Fast and light image loading library based on kotlin

http://mahmoudramadan.me

License:MIT License


Languages

Language:Kotlin 69.8%Language:Java 30.2%